From 8935e13457341841a6a02b8c8f65799f18cf4804 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:52:27 +0000 Subject: UAPI: Fix arch/mips/include/asm/Kbuild to have separate header-y lines Fix arch/mips/include/asm/Kbuild to have a separate header-y line for each header to make them easier to relocate individually as part of the UAPI header split. Signed-off-by: David Howells Acked-by: Ralf Baechle diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index 7897f05..f53f9ca 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild @@ -1,3 +1,5 @@ include include/asm-generic/Kbuild.asm -header-y += cachectl.h sgidefs.h sysmips.h +header-y += cachectl.h +header-y += sgidefs.h +header-y += sysmips.h -- cgit v0.10.2 From 070712c6cd8a02e57506ebf52d7c6056d7535b42 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:54:35 +0000 Subject: UAPI: Don't include linux/compat.h in sparc's asm/siginfo.h Don't include linux/compat.h in sparc's asm/siginfo.h as it leads to a circular dependency: asm/siginfo.h -> linux/compat.h -> asm/siginfo.h Signed-off-by: David Howells cc: David S. Miller cc: sparclinux@vger.kernel.org diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h index 988e5d8..215900f 100644 --- a/arch/sparc/include/asm/siginfo.h +++ b/arch/sparc/include/asm/siginfo.h @@ -16,8 +16,6 @@ #ifdef __KERNEL__ -#include - #ifdef CONFIG_COMPAT struct compat_siginfo; -- cgit v0.10.2 From 267aed9dfeb2225960043f89db1f58d8ab522797 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:54:36 +0000 Subject: UAPI: elf_read_implies_exec() is a kernel-only feature - so hide from userspace elf_read_implies_exec() is a kernel-only feature as the second parameter is a constant that isn't exported to userspace. Not only that, but the arch-specific overrides are not exported either. So hide the macro from userspace. Similarly, struct file should not be predeclared in userspace. Signed-off-by: David Howells diff --git a/include/linux/elf.h b/include/linux/elf.h index 31f0508..999b4f5 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -7,15 +7,6 @@ #include #endif -struct file; - -#ifndef elf_read_implies_exec - /* Executables for which elf_read_implies_exec() returns TRUE will - have the READ_IMPLIES_EXEC personality flag set automatically. - Override in asm/elf.h as needed. */ -# define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 -#endif - /* 32-bit ELF base types. */ typedef __u32 Elf32_Addr; typedef __u16 Elf32_Half; @@ -414,6 +405,13 @@ typedef struct elf64_note { } Elf64_Nhdr; #ifdef __KERNEL__ +#ifndef elf_read_implies_exec + /* Executables for which elf_read_implies_exec() returns TRUE will + have the READ_IMPLIES_EXEC personality flag set automatically. + Override in asm/elf.h as needed. */ +# define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 +#endif + #if ELF_CLASS == ELFCLASS32 extern Elf32_Dyn _DYNAMIC []; @@ -437,6 +435,8 @@ extern Elf64_Dyn _DYNAMIC []; #endif /* Optional callbacks to write extra ELF notes. */ +struct file; + #ifndef ARCH_HAVE_EXTRA_ELF_NOTES static inline int elf_coredump_extra_notes_size(void) { return 0; } static inline int elf_coredump_extra_notes_write(struct file *file, -- cgit v0.10.2 From b0b8c552e82f85475d160f8a2b61cd86cdcc0c32 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:54:36 +0000 Subject: UAPI: Make MN10300 use asm-generic/param.h Make MN10300 use the generic settings to be found in asm-generic/param.h rather than defining its own as they're exactly the same. This sorts out a problem with HZ being redefined after the UAPI split. Signed-off-by: David Howells diff --git a/arch/mn10300/include/asm/param.h b/arch/mn10300/include/asm/param.h index 789b1df..02a0ca6 100644 --- a/arch/mn10300/include/asm/param.h +++ b/arch/mn10300/include/asm/param.h @@ -11,24 +11,8 @@ #ifndef _ASM_PARAM_H #define _ASM_PARAM_H -#ifdef __KERNEL__ -#define HZ CONFIG_HZ /* Internal kernel timer frequency */ -#define USER_HZ 100 /* .. some user interfaces are in - * "ticks" */ -#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ -#endif +#include -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ #define COMMAND_LINE_SIZE 256 #endif /* _ASM_PARAM_H */ -- cgit v0.10.2 From d507462c63c7423ae9b9378ed049909a646d28f7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:56:03 +0000 Subject: UAPI: Make M32R use asm-generic/param.h Make M32R use the generic settings to be found in asm-generic/param.h rather than defining its own as they're exactly the same. This sorts out a problem with HZ being redefined after the splitting of userspace headers from kernel headers. Signed-off-by: David Howells cc: Hirokazu Takata cc: linux-m32r@ml.linux-m32r.org diff --git a/arch/m32r/include/asm/param.h b/arch/m32r/include/asm/param.h index 94c7701..fa207bd 100644 --- a/arch/m32r/include/asm/param.h +++ b/arch/m32r/include/asm/param.h @@ -1,23 +1,7 @@ #ifndef _ASM_M32R_PARAM_H #define _ASM_M32R_PARAM_H -#ifdef __KERNEL__ -# define HZ CONFIG_HZ /* Internal kernel timer frequency */ -# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ -# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ -#endif - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ +#include #endif /* _ASM_M32R_PARAM_H */ -- cgit v0.10.2 From cb0d93505f6e9d2db87a50f402ec022517ec44c8 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 12 Dec 2011 13:56:04 +0000 Subject: UAPI: Make FRV use asm-generic/param.h Make FRV use the generic settings to be found in asm-generic/param.h where possible rather than defining its own as they're mostly exactly the same. This sorts out a problem with HZ being redefined after the UAPI split. Signed-off-by: David Howells diff --git a/arch/frv/include/asm/param.h b/arch/frv/include/asm/param.h index 6859dd5..a52dca9 100644 --- a/arch/frv/include/asm/param.h +++ b/arch/frv/include/asm/param.h @@ -1,22 +1,8 @@ #ifndef _ASM_PARAM_H #define _ASM_PARAM_H -#ifdef __KERNEL__ -#define HZ CONFIG_HZ /* Internal kernel timer frequency */ -#define USER_HZ 100 /* .. some user interfaces are in "ticks" */ -#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ -#endif - -#ifndef HZ -#define HZ 100 -#endif - #define EXEC_PAGESIZE 16384 -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ +#include #endif /* _ASM_PARAM_H */ -- cgit v0.10.2 From 3d7f1dc195167efcb269e83055672d5c0a6bd650 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Rearrange definition of HZ in asm-generic/param.h Rearrange the definition of HZ in asm-generic/param.h so that the user-specific is declared before the kernel-specific one. We then explicitly #undef the userspace HZ value and replace it with the kernel HZ value. This allows the userspace params to be excised into a separate header as part of the UAPI header split. Signed-off-by: David Howells Acked-by: Arnd Bergmann diff --git a/include/asm-generic/param.h b/include/asm-generic/param.h index cdf8251..835632a 100644 --- a/include/asm-generic/param.h +++ b/include/asm-generic/param.h @@ -1,12 +1,6 @@ #ifndef __ASM_GENERIC_PARAM_H #define __ASM_GENERIC_PARAM_H -#ifdef __KERNEL__ -# define HZ CONFIG_HZ /* Internal kernel timer frequency */ -# define USER_HZ 100 /* some user interfaces are */ -# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ -#endif - #ifndef HZ #define HZ 100 #endif @@ -21,4 +15,11 @@ #define MAXHOSTNAMELEN 64 /* max length of hostname */ +#ifdef __KERNEL__ +# undef HZ +# define HZ CONFIG_HZ /* Internal kernel timer frequency */ +# define USER_HZ 100 /* some user interfaces are */ +# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ +#endif + #endif /* __ASM_GENERIC_PARAM_H */ -- cgit v0.10.2 From 6682bb86fe1f3dba7e9cb1f0955775604599cea8 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Guard linux/sound.h Place reinclusion guards on linux/sound.h otherwise the UAPI splitter script won't insert a #include to make the kernel header include the UAPI header. Signed-off-by: David Howells diff --git a/include/linux/sound.h b/include/linux/sound.h index 44dcf05..fae20ba 100644 --- a/include/linux/sound.h +++ b/include/linux/sound.h @@ -1,3 +1,5 @@ +#ifndef _LINUX_SOUND_H +#define _LINUX_SOUND_H /* * Minor numbers for the sound driver. @@ -42,3 +44,5 @@ extern void unregister_sound_mixer(int unit); extern void unregister_sound_midi(int unit); extern void unregister_sound_dsp(int unit); #endif /* __KERNEL__ */ + +#endif /* _LINUX_SOUND_H */ -- cgit v0.10.2 From c15a48d60697f06a847c5862b94a6e24d1b48a7b Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Guard linux/isdn_divertif.h Place reinclusion guards on linux/isdn_divertif.h otherwise the UAPI splitter script won't insert the #include to include the UAPI header from the kernel header. Signed-off-by: David Howells diff --git a/include/linux/isdn_divertif.h b/include/linux/isdn_divertif.h index 07821ca..a5a50f5 100644 --- a/include/linux/isdn_divertif.h +++ b/include/linux/isdn_divertif.h @@ -10,6 +10,8 @@ * */ +#ifndef _LINUX_ISDN_DIVERTIF_H +#define _LINUX_ISDN_DIVERTIF_H /***********************************************************/ /* magic value is also used to control version information */ @@ -45,3 +47,5 @@ typedef struct /*********************/ extern int DIVERT_REG_NAME(isdn_divert_if *); #endif + +#endif /* _LINUX_ISDN_DIVERTIF_H */ -- cgit v0.10.2 From 6c9f2ef9b5b3a84952ba2f99472f82e3398ac3e9 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Guard linux/pmu.h Place reinclusion guards on linux/pmu.h otherwise the UAPI splitter won't insert the #include to include the UAPI header from the kernel header. Signed-off-by: David Howells diff --git a/include/linux/pmu.h b/include/linux/pmu.h index cafe98d..84e6a55 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h @@ -6,6 +6,8 @@ * Copyright (C) 1998 Paul Mackerras. */ +#ifndef _LINUX_PMU_H +#define _LINUX_PMU_H #define PMU_DRIVER_VERSION 2 @@ -207,3 +209,5 @@ extern int pmu_sys_suspended; #endif #endif /* __KERNEL__ */ + +#endif /* _LINUX_PMU_H */ -- cgit v0.10.2 From fde28451359b476ba065a9a16fa83aa44168fe59 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Guard linux/cuda.h Place reinclusion guards on linux/cuda.h otherwise the UAPI splitter script won't insert a #include to make the kernel header include the UAPI header. Signed-off-by: David Howells diff --git a/include/linux/cuda.h b/include/linux/cuda.h index 6a3e638..9f9865f 100644 --- a/include/linux/cuda.h +++ b/include/linux/cuda.h @@ -5,6 +5,9 @@ * Copyright (C) 1996 Paul Mackerras. */ +#ifndef _LINUX_CUDA_H +#define _LINUX_CUDA_H + /* CUDA commands (2nd byte) */ #define CUDA_WARM_START 0 #define CUDA_AUTOPOLL 1 @@ -34,3 +37,5 @@ extern int cuda_request(struct adb_request *req, extern void cuda_poll(void); #endif /* __KERNEL */ + +#endif /* _LINUX_CUDA_H */ -- cgit v0.10.2 From 87d2f5e39835b990d3c78d25144dc05b068f697e Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Alter the S390 asm include guards to be recognisable by the UAPI splitter Alter some of the S390 asm include guards to fit a pattern that the UAPI splitter recognises. Signed-off-by: David Howells diff --git a/arch/s390/include/asm/chpid.h b/arch/s390/include/asm/chpid.h index fc71d8a..8e88e22 100644 --- a/arch/s390/include/asm/chpid.h +++ b/arch/s390/include/asm/chpid.h @@ -6,7 +6,7 @@ */ #ifndef _ASM_S390_CHPID_H -#define _ASM_S390_CHPID_H _ASM_S390_CHPID_H +#define _ASM_S390_CHPID_H #include #include diff --git a/arch/s390/include/asm/itcw.h b/arch/s390/include/asm/itcw.h index a9bc5c3..fb1bedd 100644 --- a/arch/s390/include/asm/itcw.h +++ b/arch/s390/include/asm/itcw.h @@ -6,7 +6,7 @@ */ #ifndef _ASM_S390_ITCW_H -#define _ASM_S390_ITCW_H _ASM_S390_ITCW_H +#define _ASM_S390_ITCW_H #include #include -- cgit v0.10.2 From e9356f4da3ffba7ab826ec3ea5f31f414f5b2a95 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 09:26:45 +0000 Subject: UAPI: Fix nested __KERNEL__ guards in video/edid.h Fix nested __KERNEL__ guards in video/edid.h to make parsing easier. Signed-off-by: David Howells diff --git a/include/video/edid.h b/include/video/edid.h index 928c342..c5f1987 100644 --- a/include/video/edid.h +++ b/include/video/edid.h @@ -1,16 +1,14 @@ #ifndef __linux_video_edid_h__ #define __linux_video_edid_h__ -#if !defined(__KERNEL__) || defined(CONFIG_X86) - struct edid_info { unsigned char dummy[128]; }; #ifdef __KERNEL__ +#ifdef CONFIG_X86 extern struct edid_info edid_info; -#endif /* __KERNEL__ */ - +#endif #endif #endif /* __linux_video_edid_h__ */ -- cgit v0.10.2 From a648bd0c9f613d8f9954eccff6009ecfb26e2722 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 15:07:49 +0000 Subject: UAPI: Make linux/patchkey.h easier to parse Make linux/patchkey.h easier to parse by making the #elif case associated with the __KERNEL__ guard a nested #if in a #else of the __KERNEL__ guard. Signed-off-by: David Howells diff --git a/include/linux/patchkey.h b/include/linux/patchkey.h index d974a6e..aefda0e 100644 --- a/include/linux/patchkey.h +++ b/include/linux/patchkey.h @@ -32,7 +32,8 @@ # else # error "could not determine byte order" # endif -#elif defined(__BYTE_ORDER) +#else +#if defined(__BYTE_ORDER) # if __BYTE_ORDER == __BIG_ENDIAN # define _PATCHKEY(id) (0xfd00|id) # elif __BYTE_ORDER == __LITTLE_ENDIAN @@ -41,5 +42,6 @@ # error "could not determine byte order" # endif #endif +#endif #endif /* _LINUX_PATCHKEY_H */ -- cgit v0.10.2 From 989e986f5b1748fe3ff714954dc0d23780c43a9c Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 15:07:49 +0000 Subject: UAPI: Fix AHZ multiple inclusion when __KERNEL__ is removed Fix AHZ multiple inclusion when __KERNEL__ is removed as part of the separation of the userspace headers from the kernel headers. Signed-off-by: David Howells diff --git a/include/linux/acct.h b/include/linux/acct.h index 3e4737f..d537aa0 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h @@ -146,6 +146,9 @@ extern void acct_exit_ns(struct pid_namespace *); * */ +#undef ACCT_VERSION +#undef AHZ + #ifdef CONFIG_BSD_PROCESS_ACCT_V3 #define ACCT_VERSION 3 #define AHZ 100 -- cgit v0.10.2 From fdc29805bd7cae133303045fc0249d76f3827613 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 15:07:49 +0000 Subject: UAPI: Don't have a #elif clause in a __KERNEL__ guard in linux/soundcard.h Don't have a #elif clause in a __KERNEL__ guard in linux/soundcard.h to make parsing easier. Signed-off-by: David Howells diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index fe204fe..dfcf86f 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h @@ -198,7 +198,8 @@ typedef struct seq_event_rec { # else # error "could not determine byte order" # endif -#elif defined(__BYTE_ORDER) +#else +# if defined(__BYTE_ORDER) # if __BYTE_ORDER == __BIG_ENDIAN # define AFMT_S16_NE AFMT_S16_BE # elif __BYTE_ORDER == __LITTLE_ENDIAN @@ -206,6 +207,7 @@ typedef struct seq_event_rec { # else # error "could not determine byte order" # endif +# endif #endif /* -- cgit v0.10.2 From 1632b9e2a14ce9f4e08faf6c4380431d63319bd3 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 13 Dec 2011 15:07:49 +0000 Subject: 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 diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index c93a22a..9176261 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h @@ -25,7 +25,8 @@ #define HWCAP_IDIVT (1 << 18) #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) +#if !defined(__ASSEMBLY__) /* * This yields a mask that user programs can use to figure out what * instruction set this cpu supports. @@ -33,5 +34,6 @@ #define ELF_HWCAP (elf_hwcap) extern unsigned int elf_hwcap; #endif +#endif #endif diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad2..e82adf6 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h @@ -22,7 +22,8 @@ # define __SWAB_64_THRU_32__ #endif -#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 +#if defined(__KERNEL__) +#if __LINUX_ARM_ARCH__ >= 6 static inline __attribute_const__ __u16 __arch_swab16(__u16 x) { @@ -38,8 +39,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) } #define __arch_swab32 __arch_swab32 -#else +#endif +#endif +#if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { __u32 t; diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 4a11237..512cd14 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -427,7 +427,8 @@ /* * The following syscalls are obsolete and no longer available for EABI. */ -#if defined(__ARM_EABI__) && !defined(__KERNEL__) +#if !defined(__KERNEL__) +#if defined(__ARM_EABI__) #undef __NR_time #undef __NR_umount #undef __NR_stime @@ -441,6 +442,7 @@ #undef __NR_syscall #undef __NR_ipc #endif +#endif #ifdef __KERNEL__ diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h index 111ed52..e4076b5 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); #endif #ifndef __ASSEMBLY__ -#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__) -#ifdef ASM_SUPPORTED -# define IA64_INTRINSIC_API(name) paravirt_ ## name -#else -# define IA64_INTRINSIC_API(name) pv_cpu_ops.name -#endif -#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name -#else + #define IA64_INTRINSIC_API(name) ia64_native_ ## name #define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name + +#if defined(__KERNEL__) +#if defined(CONFIG_PARAVIRT) +# undef IA64_INTRINSIC_API +# undef IA64_INTRINSIC_MACRO +# ifdef ASM_SUPPORTED +# define IA64_INTRINSIC_API(name) paravirt_ ## name +# else +# define IA64_INTRINSIC_API(name) pv_cpu_ops.name +# endif +#define IA64_INTRINSIC_MACRO(name) paravirt_ ## name +#endif #endif /************************************************/ diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 533812b..9b96461 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h @@ -15,10 +15,14 @@ * We don't use int-l64.h for the kernel anymore but still use it for * userspace to avoid code changes. */ -#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__) -# include -#else +#ifdef __KERNEL__ # include +#else +# if _MIPS_SZLONG == 64 +# include +# else +# include +# endif #endif #ifndef __ASSEMBLY__ diff --git a/arch/s390/include/asm/mman.h b/arch/s390/include/asm/mman.h index 4e9c8ae..d49760e 100644 --- a/arch/s390/include/asm/mman.h +++ b/arch/s390/include/asm/mman.h @@ -11,9 +11,11 @@ #include -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) +#if defined(__KERNEL__) +#if !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) int s390_mmap_check(unsigned long addr, unsigned long len); #define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len) #endif +#endif #endif /* __S390_MMAN_H__ */ diff --git a/arch/tile/include/asm/signal.h b/arch/tile/include/asm/signal.h index 1e1e616..1e5e49a 100644 --- a/arch/tile/include/asm/signal.h +++ b/arch/tile/include/asm/signal.h @@ -23,7 +23,8 @@ #include -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) +#if !defined(__ASSEMBLY__) struct pt_regs; int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); int setup_sigcontext(struct sigcontext __user *, struct pt_regs *); @@ -33,5 +34,6 @@ void signal_fault(const char *type, struct pt_regs *, void trace_unhandled_signal(const char *type, struct pt_regs *regs, unsigned long address, int signo); #endif +#endif #endif /* _ASM_TILE_SIGNAL_H */ diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index a3759cb..6d8c725 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h @@ -43,9 +43,11 @@ typedef unsigned short mifi_t; typedef __u32 if_mask; #define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */ -#if !defined(__KERNEL__) && !defined(DIV_ROUND_UP) +#if !defined(__KERNEL__) +#if !defined(DIV_ROUND_UP) #define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) #endif +#endif typedef struct if_set { if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)]; -- cgit v0.10.2