From: Chen Gang <gang.chen@asianux.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>,
Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
alpha <linux-alpha@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
linux-am33-list@redhat.com,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API.
Date: Thu, 13 Jun 2013 10:43:51 +0800 [thread overview]
Message-ID: <51B931E7.5050406@asianux.com> (raw)
In-Reply-To: <CAMuHMdWVx79L=ErRkNMide6xNqQt1RQr0psN8nqoADeV0h768A@mail.gmail.com>
On 06/11/2013 03:32 PM, Geert Uytterhoeven wrote:
> On Tue, Jun 11, 2013 at 12:26 AM, Tony Luck <tony.luck@gmail.com> wrote:
>> > On Sat, Jun 8, 2013 at 3:08 AM, Chen Gang <gang.chen@asianux.com> 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.
> The address pointers have been supposed to be "long *" for a very long time.
> Probably alpha (the second official Linux platform) did it
> differently, and never
> standardized to "long *".
Excuse me, I am not quite familiar with the details, but I guess, it is
about functional feature issues, not (or not only) about bug issues.
For the architectures which can fully support 64-bit OS, excluding ia64
and alpha, all of them can support setting 64 bits (from 0 to 63) under
64-bit machine.
I am not quite sure whether any sub-systems have already set higher bit
(> 31) under 64-bit machine, but in the future, it seems they could (at
least our API supposed so).
Thanks.
--
Chen Gang
Asianux Corporation
WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang <gang.chen@asianux.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>,
Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
alpha <linux-alpha@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
linux-am33-list@redhat.com,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API.
Date: Thu, 13 Jun 2013 02:43:51 +0000 [thread overview]
Message-ID: <51B931E7.5050406@asianux.com> (raw)
In-Reply-To: <CAMuHMdWVx79L=ErRkNMide6xNqQt1RQr0psN8nqoADeV0h768A@mail.gmail.com>
On 06/11/2013 03:32 PM, Geert Uytterhoeven wrote:
> On Tue, Jun 11, 2013 at 12:26 AM, Tony Luck <tony.luck@gmail.com> wrote:
>> > On Sat, Jun 8, 2013 at 3:08 AM, Chen Gang <gang.chen@asianux.com> 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.
> The address pointers have been supposed to be "long *" for a very long time.
> Probably alpha (the second official Linux platform) did it
> differently, and never
> standardized to "long *".
Excuse me, I am not quite familiar with the details, but I guess, it is
about functional feature issues, not (or not only) about bug issues.
For the architectures which can fully support 64-bit OS, excluding ia64
and alpha, all of them can support setting 64 bits (from 0 to 63) under
64-bit machine.
I am not quite sure whether any sub-systems have already set higher bit
(> 31) under 64-bit machine, but in the future, it seems they could (at
least our API supposed so).
Thanks.
--
Chen Gang
Asianux Corporation
next prev parent reply other threads:[~2013-06-13 2:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 10:08 [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API Chen Gang
2013-06-08 10:08 ` Chen Gang
2013-06-10 22:26 ` Tony Luck
2013-06-10 22:26 ` Tony Luck
2013-06-11 7:32 ` Geert Uytterhoeven
2013-06-11 7:32 ` Geert Uytterhoeven
2013-06-13 2:43 ` Chen Gang [this message]
2013-06-13 2:43 ` Chen Gang
2013-06-13 2:30 ` Chen Gang
2013-06-13 2:30 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B931E7.5050406@asianux.com \
--to=gang.chen@asianux.com \
--cc=dhowells@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=geert@linux-m68k.org \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
--cc=tony.luck@gmail.com \
--cc=yasutake.koichi@jp.panasonic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.