[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxGY4fLa_ovp7b_ZRCrBEPfNH6MxUS3eaWAKo01iq8DLA@mail.gmail.com>
Date: Wed, 23 May 2012 09:45:18 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Borislav Petkov <borislav.petkov@....com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, mingo@...nel.org,
linux-kernel@...r.kernel.org, frank.arnold@....com,
akpm@...ux-foundation.org, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/mce] x86/bitops: Move BIT_64() for a wider use
On Wed, May 23, 2012 at 9:42 AM, H. Peter Anvin <hpa@...or.com> wrote:
> On 05/23/2012 09:40 AM, Linus Torvalds wrote:
>
> And it doesn't work in assembly. However, I really question the assumption.
The asm case is *trivial*.
asm cannot handle anything but constant shifts anyway, so the BIT()
constness rules would remain. But since asm doesn't have any integer
types, you simply do
#ifdef __ASSEMBLY__
#define BIT(x) (1<<(x))
#else
.. the C type-morphing one ..
#endif
As to questioning the assumption, you're simply wrong. BIT(0)
absolutely MUST NOT be a 64-bit value on a 32-bit kernel. End of
discussion. This isn't an "assumption", it's an axiom.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists