Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

compat: lift compat_s64 and compat_u64 to <asm-generic/compat.h>

lift the compat_s64 and compat_u64 definitions into common code using the
COMPAT_FOR_U64_ALIGNMENT symbol for the x86 special case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Christoph Hellwig and committed by
Al Viro
cc7886d2 9123e3a7

+9 -14
-2
arch/arm64/include/asm/compat.h
··· 35 35 typedef u16 compat_ipc_pid_t; 36 36 typedef u32 compat_caddr_t; 37 37 typedef __kernel_fsid_t compat_fsid_t; 38 - typedef s64 compat_s64; 39 - typedef u64 compat_u64; 40 38 41 39 struct compat_stat { 42 40 #ifdef __AARCH64EB__
-2
arch/mips/include/asm/compat.h
··· 26 26 typedef struct { 27 27 s32 val[2]; 28 28 } compat_fsid_t; 29 - typedef s64 compat_s64; 30 - typedef u64 compat_u64; 31 29 32 30 struct compat_stat { 33 31 compat_dev_t st_dev;
-2
arch/parisc/include/asm/compat.h
··· 22 22 typedef u16 compat_nlink_t; 23 23 typedef u16 compat_ipc_pid_t; 24 24 typedef u32 compat_caddr_t; 25 - typedef s64 compat_s64; 26 - typedef u64 compat_u64; 27 25 28 26 struct compat_stat { 29 27 compat_dev_t st_dev; /* dev_t is 32 bits on parisc */
-2
arch/powerpc/include/asm/compat.h
··· 27 27 typedef u16 compat_ipc_pid_t; 28 28 typedef u32 compat_caddr_t; 29 29 typedef __kernel_fsid_t compat_fsid_t; 30 - typedef s64 compat_s64; 31 - typedef u64 compat_u64; 32 30 33 31 struct compat_stat { 34 32 compat_dev_t st_dev;
-2
arch/s390/include/asm/compat.h
··· 63 63 typedef u16 compat_ipc_pid_t; 64 64 typedef u32 compat_caddr_t; 65 65 typedef __kernel_fsid_t compat_fsid_t; 66 - typedef s64 compat_s64; 67 - typedef u64 compat_u64; 68 66 69 67 typedef struct { 70 68 u32 mask;
+1 -2
arch/sparc/include/asm/compat.h
··· 21 21 typedef u16 compat_ipc_pid_t; 22 22 typedef u32 compat_caddr_t; 23 23 typedef __kernel_fsid_t compat_fsid_t; 24 - typedef s64 compat_s64; 25 - typedef u64 compat_u64; 24 + 26 25 struct compat_stat { 27 26 compat_dev_t st_dev; 28 27 compat_ino_t st_ino;
-2
arch/x86/include/asm/compat.h
··· 27 27 typedef u16 compat_ipc_pid_t; 28 28 typedef u32 compat_caddr_t; 29 29 typedef __kernel_fsid_t compat_fsid_t; 30 - typedef s64 __attribute__((aligned(4))) compat_s64; 31 - typedef u64 __attribute__((aligned(4))) compat_u64; 32 30 33 31 struct compat_stat { 34 32 compat_dev_t st_dev;
+8
include/asm-generic/compat.h
··· 22 22 typedef u32 compat_uptr_t; 23 23 typedef u32 compat_aio_context_t; 24 24 25 + #ifdef CONFIG_COMPAT_FOR_U64_ALIGNMENT 26 + typedef s64 __attribute__((aligned(4))) compat_s64; 27 + typedef u64 __attribute__((aligned(4))) compat_u64; 28 + #else 29 + typedef s64 compat_s64; 30 + typedef u64 compat_u64; 31 + #endif 32 + 25 33 #endif