diff options
Diffstat (limited to 'arch/x86/mm/mmap.c')
-rw-r--r-- | arch/x86/mm/mmap.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 1dab5194fd9d..4b5ba85eb5c9 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
@@ -31,6 +31,10 @@ | |||
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <asm/elf.h> | 32 | #include <asm/elf.h> |
33 | 33 | ||
34 | struct __read_mostly va_alignment va_align = { | ||
35 | .flags = -1, | ||
36 | }; | ||
37 | |||
34 | static unsigned int stack_maxrandom_size(void) | 38 | static unsigned int stack_maxrandom_size(void) |
35 | { | 39 | { |
36 | unsigned int max = 0; | 40 | unsigned int max = 0; |
@@ -42,7 +46,6 @@ static unsigned int stack_maxrandom_size(void) | |||
42 | return max; | 46 | return max; |
43 | } | 47 | } |
44 | 48 | ||
45 | |||
46 | /* | 49 | /* |
47 | * Top of mmap area (just below the process stack). | 50 | * Top of mmap area (just below the process stack). |
48 | * | 51 | * |
@@ -51,21 +54,6 @@ static unsigned int stack_maxrandom_size(void) | |||
51 | #define MIN_GAP (128*1024*1024UL + stack_maxrandom_size()) | 54 | #define MIN_GAP (128*1024*1024UL + stack_maxrandom_size()) |
52 | #define MAX_GAP (TASK_SIZE/6*5) | 55 | #define MAX_GAP (TASK_SIZE/6*5) |
53 | 56 | ||
54 | /* | ||
55 | * True on X86_32 or when emulating IA32 on X86_64 | ||
56 | */ | ||
57 | static int mmap_is_ia32(void) | ||
58 | { | ||
59 | #ifdef CONFIG_X86_32 | ||
60 | return 1; | ||
61 | #endif | ||
62 | #ifdef CONFIG_IA32_EMULATION | ||
63 | if (test_thread_flag(TIF_IA32)) | ||
64 | return 1; | ||
65 | #endif | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static int mmap_is_legacy(void) | 57 | static int mmap_is_legacy(void) |
70 | { | 58 | { |
71 | if (current->personality & ADDR_COMPAT_LAYOUT) | 59 | if (current->personality & ADDR_COMPAT_LAYOUT) |