Skip to content

Commit

Permalink
Cleanup asm/{elf,page,user}.h: #ifdef __KERNEL__ is no longer needed
Browse files Browse the repository at this point in the history
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: Kirill A. Shutemov <k.shutemov@gmail.com>
Reviewed-by: David Woodhouse <dwmw2@infradead.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kirill A. Shutemov authored and Linus Torvalds committed Feb 7, 2008
1 parent c1445db commit 516c25a
Show file tree
Hide file tree
Showing 45 changed files with 3 additions and 150 deletions.
3 changes: 0 additions & 3 deletions include/asm-alpha/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 */
3 changes: 0 additions & 3 deletions include/asm-alpha/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H

#ifdef __KERNEL__

#include <linux/const.h>
#include <asm/pal.h>

Expand Down Expand Up @@ -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 */
3 changes: 0 additions & 3 deletions include/asm-arm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -115,5 +114,3 @@ extern char elf_platform[];
} while (0)

#endif

#endif
5 changes: 0 additions & 5 deletions include/asm-arm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -192,6 +189,4 @@ typedef unsigned long pgprot_t;

#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif
2 changes: 0 additions & 2 deletions include/asm-avr32/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
4 changes: 0 additions & 4 deletions include/asm-avr32/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -107,6 +105,4 @@ static inline int get_order(unsigned long size)
*/
#define HIGHMEM_START 0x20000000UL

#endif /* __KERNEL__ */

#endif /* __ASM_AVR32_PAGE_H */
2 changes: 0 additions & 2 deletions include/asm-blackfin/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions include/asm-blackfin/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#endif
#define PAGE_MASK (~(PAGE_SIZE-1))

#ifdef __KERNEL__

#include <asm/setup.h>

#ifndef __ASSEMBLY__
Expand Down Expand Up @@ -88,6 +86,5 @@ extern unsigned long memory_end;
#include <asm-generic/page.h>

#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */

#endif /* _BLACKFIN_PAGE_H */
3 changes: 0 additions & 3 deletions include/asm-cris/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: */
Expand Down Expand Up @@ -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
4 changes: 0 additions & 4 deletions include/asm-cris/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _CRIS_PAGE_H
#define _CRIS_PAGE_H

#ifdef __KERNEL__

#include <asm/arch/page.h>
#include <linux/const.h>

Expand Down Expand Up @@ -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 */

2 changes: 0 additions & 2 deletions include/asm-frv/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions include/asm-frv/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _ASM_PAGE_H
#define _ASM_PAGE_H

#ifdef __KERNEL__

#include <asm/virtconvert.h>
#include <asm/mem-layout.h>
#include <asm/sections.h>
Expand Down Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions include/asm-h8300/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions include/asm-h8300/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _H8300_PAGE_H
#define _H8300_PAGE_H

#ifdef __KERNEL__

/* PAGE_SHIFT determines the page size */

#define PAGE_SHIFT (12)
Expand Down Expand Up @@ -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 */
3 changes: 0 additions & 3 deletions include/asm-ia64/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -248,6 +247,4 @@ do { \
} \
} while (0)

#endif /* __KERNEL__ */

#endif /* _ASM_IA64_ELF_H */
3 changes: 0 additions & 3 deletions include/asm-ia64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/

# ifdef __KERNEL__

#include <asm/intrinsics.h>
#include <asm/types.h>

Expand Down Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions include/asm-m32r/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions include/asm-m32r/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions include/asm-m68k/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions include/asm-m68k/page.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef _M68K_PAGE_H
#define _M68K_PAGE_H


#ifdef __KERNEL__

#include <linux/const.h>

/* PAGE_SHIFT determines the page size */
Expand Down Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions include/asm-m68knommu/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,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
4 changes: 0 additions & 4 deletions include/asm-m68knommu/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _M68KNOMMU_PAGE_H
#define _M68KNOMMU_PAGE_H

#ifdef __KERNEL__

/* PAGE_SHIFT determines the page size */

#define PAGE_SHIFT (12)
Expand Down Expand Up @@ -78,6 +76,4 @@ extern unsigned long memory_end;

#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif /* _M68KNOMMU_PAGE_H */
4 changes: 0 additions & 4 deletions include/asm-mips/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];

#endif /* !defined(ELF_ARCH) */

#ifdef __KERNEL__

struct mips_abi;

extern struct mips_abi mips_abi;
Expand Down Expand Up @@ -328,8 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \
dump_task_fpu(tsk, elf_fpregs)

#endif /* __KERNEL__ */

#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE

Expand Down
5 changes: 0 additions & 5 deletions include/asm-mips/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#ifndef _ASM_PAGE_H
#define _ASM_PAGE_H


#ifdef __KERNEL__

#include <spaces.h>

/*
Expand Down Expand Up @@ -190,6 +187,4 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* defined (__KERNEL__) */

#endif /* _ASM_PAGE_H */
4 changes: 0 additions & 4 deletions include/asm-mips/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#ifndef _ASM_USER_H
#define _ASM_USER_H

#ifdef __KERNEL__

#include <asm/page.h>
#include <asm/reg.h>

Expand Down Expand Up @@ -57,6 +55,4 @@ struct user {
#define HOST_DATA_START_ADDR (u.start_data)
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)

#endif /* __KERNEL__ */

#endif /* _ASM_USER_H */
3 changes: 0 additions & 3 deletions include/asm-parisc/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,11 @@ typedef unsigned long elf_greg_t;

#define ELF_PLATFORM ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)

#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) \
current->personality = PER_LINUX; \
current->thread.map_base = DEFAULT_MAP_BASE; \
current->thread.task_size = DEFAULT_TASK_SIZE \

#endif

/*
* Fill in general registers in a core dump. This saves pretty
* much the same registers as hp-ux, although in a different order.
Expand Down
4 changes: 0 additions & 4 deletions include/asm-parisc/page.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _PARISC_PAGE_H
#define _PARISC_PAGE_H

#ifdef __KERNEL__

#include <linux/const.h>

#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
Expand Down Expand Up @@ -175,6 +173,4 @@ extern int npmem_ranges;
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __KERNEL__ */

#endif /* _PARISC_PAGE_H */
3 changes: 0 additions & 3 deletions include/asm-powerpc/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* 2 of the License, or (at your option) any later version.
*/

#ifdef __KERNEL__
#include <asm/asm-compat.h>
#include <asm/kdump.h>

Expand Down Expand Up @@ -194,6 +193,4 @@ struct vm_area_struct;
#include <asm-generic/memory_model.h>
#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */

#endif /* _ASM_POWERPC_PAGE_H */
Loading

0 comments on commit 516c25a

Please sign in to comment.