Commit 516c25a8 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

Cleanup asm/{elf,page,user}.h: #ifdef __KERNEL__ is no longer needed



asm/elf.h, asm/page.h and asm/user.h don't export to userspace now, so we can
drop #ifdef __KERNEL__ for them.

[k.shutemov@gmail.com: remove #ifdef __KERNEL_]
Signed-off-by: default avatarKirill A. Shutemov <k.shutemov@gmail.com>
Reviewed-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: default avatarKirill A. Shutemov <k.shutemov@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c1445db9
......@@ -144,8 +144,6 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
})
#ifdef __KERNEL__
#define SET_PERSONALITY(EX, IBCS2) \
set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
......@@ -164,5 +162,4 @@ extern int alpha_l3_cacheshape;
NEW_AUX_ENT(AT_L3_CACHESHAPE, alpha_l3_cacheshape); \
} while (0)
#endif /* __KERNEL__ */
#endif /* __ASM_ALPHA_ELF_H */
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H
#ifdef __KERNEL__
#include <linux/const.h>
#include <asm/pal.h>
......@@ -98,5 +96,4 @@ typedef unsigned long pgprot_t;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _ALPHA_PAGE_H */
......@@ -41,7 +41,6 @@ typedef struct user_fp elf_fpregset_t;
#endif
#define ELF_ARCH EM_ARM
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
/*
* This yields a string that ld.so will use to load implementation
......@@ -115,5 +114,3 @@ extern char elf_platform[];
} while (0)
#endif
#endif
......@@ -10,9 +10,6 @@
#ifndef _ASMARM_PAGE_H
#define _ASMARM_PAGE_H
#ifdef __KERNEL__
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
......@@ -192,6 +189,4 @@ typedef unsigned long pgprot_t;
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif
......@@ -103,8 +103,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
#endif
#endif /* __ASM_AVR32_ELF_H */
......@@ -8,8 +8,6 @@
#ifndef __ASM_AVR32_PAGE_H
#define __ASM_AVR32_PAGE_H
#ifdef __KERNEL__
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#ifdef __ASSEMBLY__
......@@ -107,6 +105,4 @@ static inline int get_order(unsigned long size)
*/
#define HIGHMEM_START 0x20000000UL
#endif /* __KERNEL__ */
#endif /* __ASM_AVR32_PAGE_H */
......@@ -120,8 +120,6 @@ do { \
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#endif
#endif
......@@ -11,8 +11,6 @@
#endif
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
#include <asm/setup.h>
#ifndef __ASSEMBLY__
......@@ -88,6 +86,5 @@ extern unsigned long memory_end;
#include <asm-generic/page.h>
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _BLACKFIN_PAGE_H */
......@@ -45,7 +45,6 @@ typedef unsigned long elf_fpregset_t;
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_CRIS
#ifdef __KERNEL__
#include <asm/arch/elf.h>
/* The master for these definitions is {binutils}/include/elf/cris.h: */
......@@ -91,6 +90,4 @@ typedef unsigned long elf_fpregset_t;
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#endif /* __KERNEL__ */
#endif
#ifndef _CRIS_PAGE_H
#define _CRIS_PAGE_H
#ifdef __KERNEL__
#include <asm/arch/page.h>
#include <linux/const.h>
......@@ -74,7 +72,5 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _CRIS_PAGE_H */
......@@ -137,8 +137,6 @@ do { \
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#endif
#endif
#ifndef _ASM_PAGE_H
#define _ASM_PAGE_H
#ifdef __KERNEL__
#include <asm/virtconvert.h>
#include <asm/mem-layout.h>
#include <asm/sections.h>
......@@ -79,6 +77,4 @@ extern unsigned long max_pfn;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _ASM_PAGE_H */
......@@ -55,9 +55,7 @@ typedef unsigned long elf_fpregset_t;
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
#endif
#define R_H8_NONE 0
#define R_H8_DIR32 1
......
#ifndef _H8300_PAGE_H
#define _H8300_PAGE_H
#ifdef __KERNEL__
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT (12)
......@@ -79,6 +77,4 @@ extern unsigned long memory_end;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _H8300_PAGE_H */
......@@ -177,7 +177,6 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
relevant until we have real hardware to play with... */
#define ELF_PLATFORM NULL
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
#define elf_read_implies_exec(ex, executable_stack) \
((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)
......@@ -248,6 +247,4 @@ do { \
} \
} while (0)
#endif /* __KERNEL__ */
#endif /* _ASM_IA64_ELF_H */
......@@ -7,8 +7,6 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
# ifdef __KERNEL__
#include <asm/intrinsics.h>
#include <asm/types.h>
......@@ -227,5 +225,4 @@ get_order (unsigned long size)
(((current->personality & READ_IMPLIES_EXEC) != 0) \
? VM_EXEC : 0))
# endif /* __KERNEL__ */
#endif /* _ASM_IA64_PAGE_H */
......@@ -129,8 +129,6 @@ typedef elf_fpreg_t elf_fpregset_t;
intent than poking at uname or /proc/cpuinfo. */
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
#endif
#endif /* _ASM_M32R__ELF_H */
......@@ -6,7 +6,6 @@
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
extern void clear_page(void *to);
......@@ -87,5 +86,4 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _ASM_M32R_PAGE_H */
......@@ -114,8 +114,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
#define ELF_PLATFORM (NULL)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#endif
#endif
#ifndef _M68K_PAGE_H
#define _M68K_PAGE_H
#ifdef __KERNEL__
#include <linux/const.h>
/* PAGE_SHIFT determines the page size */
......@@ -230,6 +227,4 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _M68K_PAGE_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment