Thread (26 messages) 26 messages, 11 authors, 2021-04-21

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-04-21 08:58:46
Also in: linux-mips, linux-mm, linuxppc-dev, lkml, netdev

On Wed, Apr 21, 2021 at 10:43 AM David Laight [off-list ref] wrote:
From: Arnd Bergmann Sent: 20 April 2021 22:20
quoted
On Tue, Apr 20, 2021 at 11:14 PM Vineet Gupta [off-list ref] wrote:
quoted
On 4/20/21 12:07 AM, Arnd Bergmann wrote:
quoted
quoted
which means that half the 32-bit architectures do this. This may
cause more problems when arc and/or microblaze want to support
64-bit kernels and compat mode in the future on their latest hardware,
as that means duplicating the x86 specific hacks we have for compat.

What is alignof(u64) on 64-bit arc?
$ echo 'int a = __alignof__(long long);' | arc64-linux-gnu-gcc -xc -
-Wall -S -o - | grep -A1 a: | tail -n 1 | cut -f 3
8
Ok, good.
That test doesn't prove anything.
Try running on x86:
$ echo 'int a = __alignof__(long long);' | gcc -xc - -Wall -S -o - -m32
a:
        .long   8
Right, I had wondered about that one after I sent the email.
Using '__alignof__(struct {long long x;})' does give the expected 4.

__alignof__() returns the preferred alignment, not the enforced
alignmnet - go figure.
I checked the others as well now, and i386 is the only one that
changed here: m68k still has '2', while arc/csky/h8300/microblaze/
nios2/or1k/sh/i386 all have '4' and the rest have '8'.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help