Re: [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Chen Gang <gang.chen@xxxxxxxxxxx>
- Subject: Re: [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API.
- From: Tony Luck <tony.luck@xxxxxxxxx>
- Date: Mon, 10 Jun 2013 15:26:26 -0700
- Cc: Richard Henderson <rth@xxxxxxxxxxx>, ink@xxxxxxxxxxxxxxxxxxxx, Matt Turner <mattst88@xxxxxxxxx>, "dhowells@xxxxxxxxxx" <dhowells@xxxxxxxxxx>, "Yu, Fenghua" <fenghua.yu@xxxxxxxxx>, yasutake.koichi@xxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, linux-am33-list@xxxxxxxxxx, Linux-Arch <linux-arch@xxxxxxxxxxxxxxx>
- In-reply-to: <51B30285.6020503@asianux.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <51B30285.6020503@asianux.com>
On Sat, Jun 8, 2013 at 3:08 AM, Chen Gang <gang.chen@xxxxxxxxxxx> wrote:
> using 'unsigned int *', implicitly:
> ./ia64/include/asm/bitops.h:63:__set_bit (int nr, volatile void *addr)
There is some downside on ia64 to your suggestion. If "addr" is properly
aligned for an "int", but misaligned for a long ... i.e. addr%8 == 4, then I'll
take an unaligned reference trap if I work with long* where the current code
working with int* does not.
Now perhaps all the callers do guarantee long* alignment? But I don't know.
Apart from uniformity, there doesn't see to be any upside to changing this.
-Tony Luck
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]