aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2011-12-13 10:07:49 -0500
committerDavid Howells <dhowells@redhat.com>2011-12-13 10:07:49 -0500
commit1632b9e2a14ce9f4e08faf6c4380431d63319bd3 (patch)
tree572e45a2de74d233af5d98242bafbd193e074f43 /arch
parentfdc29805bd7cae133303045fc0249d76f3827613 (diff)
UAPI: Split trivial #if defined(__KERNEL__) && X conditionals
Split trivial #if defined(__KERNEL__) && X conditionals to make automated disintegration easier. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/hwcap.h4
-rw-r--r--arch/arm/include/asm/swab.h7
-rw-r--r--arch/arm/include/asm/unistd.h4
-rw-r--r--arch/ia64/include/asm/intrinsics.h21
-rw-r--r--arch/mips/include/asm/types.h10
-rw-r--r--arch/s390/include/asm/mman.h4
-rw-r--r--arch/tile/include/asm/signal.h4
7 files changed, 37 insertions, 17 deletions
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h
index c93a22a8b92..917626128a1 100644
--- a/arch/arm/include/asm/hwcap.h
+++ b/arch/arm/include/asm/hwcap.h
@@ -25,7 +25,8 @@
25#define HWCAP_IDIVT (1 << 18) 25#define HWCAP_IDIVT (1 << 18)
26#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) 26#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
27 27
28#if defined(__KERNEL__) && !defined(__ASSEMBLY__) 28#if defined(__KERNEL__)
29#if !defined(__ASSEMBLY__)
29/* 30/*
30 * This yields a mask that user programs can use to figure out what 31 * This yields a mask that user programs can use to figure out what
31 * instruction set this cpu supports. 32 * instruction set this cpu supports.
@@ -33,5 +34,6 @@
33#define ELF_HWCAP (elf_hwcap) 34#define ELF_HWCAP (elf_hwcap)
34extern unsigned int elf_hwcap; 35extern unsigned int elf_hwcap;
35#endif 36#endif
37#endif
36 38
37#endif 39#endif
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 9997ad20eff..e82adf64d1d 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -22,7 +22,8 @@
22# define __SWAB_64_THRU_32__ 22# define __SWAB_64_THRU_32__
23#endif 23#endif
24 24
25#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 25#if defined(__KERNEL__)
26#if __LINUX_ARM_ARCH__ >= 6
26 27
27static inline __attribute_const__ __u16 __arch_swab16(__u16 x) 28static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
28{ 29{
@@ -38,8 +39,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
38} 39}
39#define __arch_swab32 __arch_swab32 40#define __arch_swab32 __arch_swab32
40 41
41#else 42#endif
43#endif
42 44
45#if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
43static inline __attribute_const__ __u32 __arch_swab32(__u32 x) 46static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
44{ 47{
45 __u32 t; 48 __u32 t;
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 4a112378380..512cd147345 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -427,7 +427,8 @@
427/* 427/*
428 * The following syscalls are obsolete and no longer available for EABI. 428 * The following syscalls are obsolete and no longer available for EABI.
429 */ 429 */
430#if defined(__ARM_EABI__) && !defined(__KERNEL__) 430#if !defined(__KERNEL__)
431#if defined(__ARM_EABI__)
431#undef __NR_time 432#undef __NR_time
432#undef __NR_umount 433#undef __NR_umount
433#undef __NR_stime 434#undef __NR_stime
@@ -441,6 +442,7 @@
441#undef __NR_syscall 442#undef __NR_syscall
442#undef __NR_ipc 443#undef __NR_ipc
443#endif 444#endif
445#endif
444 446
445#ifdef __KERNEL__ 447#ifdef __KERNEL__
446 448
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h
index 111ed522289..e4076b51182 100644
--- a/arch/ia64/include/asm/intrinsics.h
+++ b/arch/ia64/include/asm/intrinsics.h
@@ -201,16 +201,21 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void);
201#endif 201#endif
202 202
203#ifndef __ASSEMBLY__ 203#ifndef __ASSEMBLY__
204#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__) 204
205#ifdef ASM_SUPPORTED
206# define IA64_INTRINSIC_API(name) paravirt_ ## name
207#else
208# define IA64_INTRINSIC_API(name) pv_cpu_ops.name
209#endif
210#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name
211#else
212#define IA64_INTRINSIC_API(name) ia64_native_ ## name 205#define IA64_INTRINSIC_API(name) ia64_native_ ## name
213#define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name 206#define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name
207
208#if defined(__KERNEL__)
209#if defined(CONFIG_PARAVIRT)
210# undef IA64_INTRINSIC_API
211# undef IA64_INTRINSIC_MACRO
212# ifdef ASM_SUPPORTED
213# define IA64_INTRINSIC_API(name) paravirt_ ## name
214# else
215# define IA64_INTRINSIC_API(name) pv_cpu_ops.name
216# endif
217#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name
218#endif
214#endif 219#endif
215 220
216/************************************************/ 221/************************************************/
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index 533812b6188..9b96461bc1e 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -15,10 +15,14 @@
15 * We don't use int-l64.h for the kernel anymore but still use it for 15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes. 16 * userspace to avoid code changes.
17 */ 17 */
18#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__) 18#ifdef __KERNEL__
19# include <asm-generic/int-l64.h>
20#else
21# include <asm-generic/int-ll64.h> 19# include <asm-generic/int-ll64.h>
20#else
21# if _MIPS_SZLONG == 64
22# include <asm-generic/int-l64.h>
23# else
24# include <asm-generic/int-ll64.h>
25# endif
22#endif 26#endif
23 27
24#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
diff --git a/arch/s390/include/asm/mman.h b/arch/s390/include/asm/mman.h
index 4e9c8ae0a63..d49760e6350 100644
--- a/arch/s390/include/asm/mman.h
+++ b/arch/s390/include/asm/mman.h
@@ -11,9 +11,11 @@
11 11
12#include <asm-generic/mman.h> 12#include <asm-generic/mman.h>
13 13
14#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) 14#if defined(__KERNEL__)
15#if !defined(__ASSEMBLY__) && defined(CONFIG_64BIT)
15int s390_mmap_check(unsigned long addr, unsigned long len); 16int s390_mmap_check(unsigned long addr, unsigned long len);
16#define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len) 17#define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len)
17#endif 18#endif
19#endif
18 20
19#endif /* __S390_MMAN_H__ */ 21#endif /* __S390_MMAN_H__ */
diff --git a/arch/tile/include/asm/signal.h b/arch/tile/include/asm/signal.h
index 1e1e616783e..1e5e49aad54 100644
--- a/arch/tile/include/asm/signal.h
+++ b/arch/tile/include/asm/signal.h
@@ -23,7 +23,8 @@
23 23
24#include <asm-generic/signal.h> 24#include <asm-generic/signal.h>
25 25
26#if defined(__KERNEL__) && !defined(__ASSEMBLY__) 26#if defined(__KERNEL__)
27#if !defined(__ASSEMBLY__)
27struct pt_regs; 28struct pt_regs;
28int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); 29int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
29int setup_sigcontext(struct sigcontext __user *, struct pt_regs *); 30int setup_sigcontext(struct sigcontext __user *, struct pt_regs *);
@@ -33,5 +34,6 @@ void signal_fault(const char *type, struct pt_regs *,
33void trace_unhandled_signal(const char *type, struct pt_regs *regs, 34void trace_unhandled_signal(const char *type, struct pt_regs *regs,
34 unsigned long address, int signo); 35 unsigned long address, int signo);
35#endif 36#endif
37#endif
36 38
37#endif /* _ASM_TILE_SIGNAL_H */ 39#endif /* _ASM_TILE_SIGNAL_H */