summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-04-11 14:36:21 +0200
committerArnd Bergmann <arnd@arndb.de>2018-04-19 13:29:40 +0200
commite4da0d6872db4aa12426057cb67059c4dee7df09 (patch)
treeac00cb02c484f9624ce16394ea0a96f8605097be /arch/sparc
parent2b5a9a37e97467fea67070a94529d6d07e549270 (diff)
sparc: compat: Allow including asm/compat.h for 32-bit
We have several files on sparc that include linux/compat.h and expect asm/compat.h not to be included for 32-bit builds, otherwise we get a build failure. Since we need to include asm/compat.h for compat time_t handling on all 32-bit architectures now, this hides some portions of asm/compat.h in order to let the rest of the file get included. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h
index 615283e16f22..1898b6223160 100644
--- a/arch/sparc/include/asm/compat.h
+++ b/arch/sparc/include/asm/compat.h
@@ -168,6 +168,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
return (u32)(unsigned long)uptr;
}
+#ifdef CONFIG_COMPAT
static inline void __user *arch_compat_alloc_user_space(long len)
{
struct pt_regs *regs = current_thread_info()->kregs;
@@ -184,6 +185,7 @@ static inline void __user *arch_compat_alloc_user_space(long len)
return (void __user *) usp;
}
+#endif
struct compat_ipc64_perm {
compat_key_t key;
@@ -243,6 +245,7 @@ struct compat_shmid64_ds {
unsigned int __unused2;
};
+#ifdef CONFIG_COMPAT
static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
@@ -254,5 +257,6 @@ static inline bool in_compat_syscall(void)
return pt_regs_trap_type(current_pt_regs()) == 0x110;
}
#define in_compat_syscall in_compat_syscall
+#endif
#endif /* _ASM_SPARC64_COMPAT_H */