[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3bd8bfd-d66c-45fe-a634-9ac418806f40@zytor.com>
Date: Mon, 19 Jan 2026 13:12:13 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Andreas Larsson <andreas@...sler.com>,
Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...nel.org>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Arnd Bergmann <arnd@...db.de>, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, sparclinux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
linux-s390@...r.kernel.org
Subject: Re: [PATCH 4/4] asm-generic/bitsperlong.h: Add sanity checks for
__BITS_PER_LONG
On 2026-01-19 07:39, Thomas Weißschuh wrote:
>>
>> Do we actually support any compilers which *don't* define __SIZEOF_LONG__?
>
> When building the kernel not. I used this pattern because it is used
> further up in the file. There it makes sense as it is actually a userspace
> header which needs to support all kinds of compilers.
> But this new check is gated behind __KERNEL__ anyways...
> For the next revision I will move it into the regular kernel-internal
> bitsperlong.h. That will be less confusing and still handle the vDSO build,
> due to the way our header hierarchy works.
>
The point is that we can simply do:
#define __BITS_PER_LONG (__SIZEOF_LONG__ << 3)
... and it will always be consistent.
-hpa
Powered by blists - more mailing lists