Skip to content
Snippets Groups Projects
Commit 922a70d3 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

aout: move STACK_TOP[_MAX] to asm/processor.h


Move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're
required whether or not A.OUT format is available.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3eb05676
No related branches found
No related tags found
No related merge requests found
Showing
with 46 additions and 79 deletions
...@@ -98,11 +98,5 @@ struct exec ...@@ -98,11 +98,5 @@ struct exec
set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \ set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \
? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
#define STACK_TOP \ #endif /* __KERNEL__ */
(current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
#define STACK_TOP_MAX 0x00120000000UL
#endif
#endif /* __A_OUT_GNU_H__ */ #endif /* __A_OUT_GNU_H__ */
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
*/ */
#define TASK_SIZE (0x40000000000UL) #define TASK_SIZE (0x40000000000UL)
#define STACK_TOP \
(current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
#define STACK_TOP_MAX 0x00120000000UL
/* This decides where the kernel will search for a free chunk of vm /* This decides where the kernel will search for a free chunk of vm
* space during mmap's. * space during mmap's.
*/ */
......
...@@ -27,12 +27,6 @@ struct exec ...@@ -27,12 +27,6 @@ struct exec
#define M_ARM 103 #define M_ARM 103
#ifdef __KERNEL__
#define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \
TASK_SIZE : TASK_SIZE_26)
#define STACK_TOP_MAX TASK_SIZE
#endif
#ifndef LIBRARY_START_TEXT #ifndef LIBRARY_START_TEXT
#define LIBRARY_START_TEXT (0x00c00000) #define LIBRARY_START_TEXT (0x00c00000)
#endif #endif
......
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/types.h> #include <asm/types.h>
#ifdef __KERNEL__
#define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \
TASK_SIZE : TASK_SIZE_26)
#define STACK_TOP_MAX TASK_SIZE
#endif
union debug_insn { union debug_insn {
u32 arm; u32 arm;
u16 thumb; u16 thumb;
......
...@@ -17,11 +17,4 @@ struct exec ...@@ -17,11 +17,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
#endif /* __ASM_AVR32_A_OUT_H */ #endif /* __ASM_AVR32_A_OUT_H */
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
#define TASK_SIZE 0x80000000 #define TASK_SIZE 0x80000000
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline void *current_text_addr(void) static inline void *current_text_addr(void)
......
...@@ -16,10 +16,4 @@ struct exec { ...@@ -16,10 +16,4 @@ struct exec {
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#endif
#endif /* __BFIN_A_OUT_H__ */ #endif /* __BFIN_A_OUT_H__ */
...@@ -30,6 +30,10 @@ static inline void wrusp(unsigned long usp) ...@@ -30,6 +30,10 @@ static inline void wrusp(unsigned long usp)
extern unsigned long memory_end; extern unsigned long memory_end;
#define TASK_SIZE (memory_end) #define TASK_SIZE (memory_end)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#endif
#define TASK_UNMAPPED_BASE 0 #define TASK_UNMAPPED_BASE 0
struct thread_struct { struct thread_struct {
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
* wants to know about a.out even if there is no interpreter available... * wants to know about a.out even if there is no interpreter available...
*/ */
/* grabbed from the intel stuff */
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
struct exec struct exec
{ {
unsigned long a_info; /* Use macros N_MAGIC, etc for access */ unsigned long a_info; /* Use macros N_MAGIC, etc for access */
...@@ -28,5 +23,4 @@ struct exec ...@@ -28,5 +23,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#endif #endif
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
struct task_struct; struct task_struct;
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
/* This decides where the kernel will search for a free chunk of vm /* This decides where the kernel will search for a free chunk of vm
* space during mmap's. * space during mmap's.
*/ */
......
...@@ -17,11 +17,4 @@ struct exec ...@@ -17,11 +17,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
#endif /* __H8300_A_OUT_H__ */ #endif /* __H8300_A_OUT_H__ */
...@@ -39,6 +39,11 @@ static inline void wrusp(unsigned long usp) { ...@@ -39,6 +39,11 @@ static inline void wrusp(unsigned long usp) {
*/ */
#define TASK_SIZE (0xFFFFFFFFUL) #define TASK_SIZE (0xFFFFFFFFUL)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
/* /*
* This decides where the kernel will search for a free chunk of vm * This decides where the kernel will search for a free chunk of vm
* space during mmap's. We won't be using it * space during mmap's. We won't be using it
......
...@@ -29,7 +29,4 @@ struct exec { ...@@ -29,7 +29,4 @@ struct exec {
#define N_SYMSIZE(x) 0 #define N_SYMSIZE(x) 0
#define N_TXTOFF(x) 0 #define N_TXTOFF(x) 0
#ifdef __KERNEL__
#include <asm/ustack.h>
#endif
#endif /* _ASM_IA64_A_OUT_H */ #endif /* _ASM_IA64_A_OUT_H */
...@@ -17,11 +17,4 @@ struct exec ...@@ -17,11 +17,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
#endif /* _ASM_M32R_A_OUT_H */ #endif /* _ASM_M32R_A_OUT_H */
...@@ -60,6 +60,11 @@ extern struct cpuinfo_m32r cpu_data[]; ...@@ -60,6 +60,11 @@ extern struct cpuinfo_m32r cpu_data[];
#define TASK_SIZE (0x00400000UL) #define TASK_SIZE (0x00400000UL)
#endif #endif
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
/* This decides where the kernel will search for a free chunk of vm /* This decides where the kernel will search for a free chunk of vm
* space during mmap's. * space during mmap's.
*/ */
......
...@@ -17,11 +17,4 @@ struct exec ...@@ -17,11 +17,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
#endif /* __M68K_A_OUT_H__ */ #endif /* __M68K_A_OUT_H__ */
...@@ -41,6 +41,11 @@ static inline void wrusp(unsigned long usp) ...@@ -41,6 +41,11 @@ static inline void wrusp(unsigned long usp)
#define TASK_SIZE (0x0E000000UL) #define TASK_SIZE (0x0E000000UL)
#endif #endif
#ifdef __KERNEL__
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
#endif
/* This decides where the kernel will search for a free chunk of vm /* This decides where the kernel will search for a free chunk of vm
* space during mmap's. * space during mmap's.
*/ */
......
...@@ -32,17 +32,4 @@ struct exec ...@@ -32,17 +32,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
#ifdef CONFIG_32BIT
#define STACK_TOP TASK_SIZE
#endif
#ifdef CONFIG_64BIT
#define STACK_TOP \
(test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
#endif
#define STACK_TOP_MAX TASK_SIZE
#endif
#endif /* _ASM_A_OUT_H */ #endif /* _ASM_A_OUT_H */
...@@ -39,6 +39,7 @@ extern unsigned int vced_count, vcei_count; ...@@ -39,6 +39,7 @@ extern unsigned int vced_count, vcei_count;
* so don't change it unless you know what you are doing. * so don't change it unless you know what you are doing.
*/ */
#define TASK_SIZE 0x7fff8000UL #define TASK_SIZE 0x7fff8000UL
#define STACK_TOP TASK_SIZE
/* /*
* This decides where the kernel will search for a free chunk of vm * This decides where the kernel will search for a free chunk of vm
...@@ -57,6 +58,8 @@ extern unsigned int vced_count, vcei_count; ...@@ -57,6 +58,8 @@ extern unsigned int vced_count, vcei_count;
*/ */
#define TASK_SIZE32 0x7fff8000UL #define TASK_SIZE32 0x7fff8000UL
#define TASK_SIZE 0x10000000000UL #define TASK_SIZE 0x10000000000UL
#define STACK_TOP \
(test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
/* /*
* This decides where the kernel will search for a free chunk of vm * This decides where the kernel will search for a free chunk of vm
...@@ -69,6 +72,10 @@ extern unsigned int vced_count, vcei_count; ...@@ -69,6 +72,10 @@ extern unsigned int vced_count, vcei_count;
(test_tsk_thread_flag(tsk, TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE) (test_tsk_thread_flag(tsk, TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE)
#endif #endif
#ifdef __KERNEL__
#define STACK_TOP_MAX TASK_SIZE
#endif
#define NUM_FPU_REGS 32 #define NUM_FPU_REGS 32
typedef __u64 fpureg_t; typedef __u64 fpureg_t;
......
...@@ -17,14 +17,4 @@ struct exec ...@@ -17,14 +17,4 @@ struct exec
#define N_DRSIZE(a) ((a).a_drsize) #define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms) #define N_SYMSIZE(a) ((a).a_syms)
#ifdef __KERNEL__
/* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
* prumpf */
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX DEFAULT_TASK_SIZE
#endif
#endif /* __A_OUT_GNU_H__ */ #endif /* __A_OUT_GNU_H__ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment