diff options
author | Matt Evans <matt@ozlabs.org> | 2011-12-07 15:57:09 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-18 22:41:14 -0500 |
commit | 2c9c6ce0199a4d252e20c531cfdc9d24e39235c0 (patch) | |
tree | 719f208c3664564820de15f1de96b496798c7e35 /arch/powerpc/include | |
parent | a66086b8197da8dc83b698642d5947ff850e708d (diff) |
powerpc: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64
PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h
prevents 64-bit userland from seeing this definition, instead defaulting
to u64 == long in userspace. Some user programs (e.g. kvmtool) may actually
want LL64, so this patch adds a check for __SANE_USERSPACE_TYPES__ so that,
if defined, int-ll64.h is included instead.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index 8947b9827bc4..d82e94e6c2b4 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -5,8 +5,11 @@ | |||
5 | * This is here because we used to use l64 for 64bit powerpc | 5 | * This is here because we used to use l64 for 64bit powerpc |
6 | * and we don't want to impact user mode with our change to ll64 | 6 | * and we don't want to impact user mode with our change to ll64 |
7 | * in the kernel. | 7 | * in the kernel. |
8 | * | ||
9 | * However, some user programs are fine with this. They can | ||
10 | * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. | ||
8 | */ | 11 | */ |
9 | #if defined(__powerpc64__) && !defined(__KERNEL__) | 12 | #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__) |
10 | # include <asm-generic/int-l64.h> | 13 | # include <asm-generic/int-l64.h> |
11 | #else | 14 | #else |
12 | # include <asm-generic/int-ll64.h> | 15 | # include <asm-generic/int-ll64.h> |