diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2019-07-23 14:52:18 +0200 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2019-09-16 13:09:02 +0530 |
commit | ab9267cb6edacb505f5e9c3941129b532d0b610e (patch) | |
tree | c55fe71e77756c86251342803de1d81f97611346 /arch | |
parent | 04f67d89e68e9b7fac355bc494fad3f212c844b2 (diff) |
Revert "x86/mm: Identify the end of the kernel area to be reserved"
This reverts commit c603a309cc75f3dd018ddb20ee44c05047918cbf.
It breaks the build with clang.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2e50915dacfa823c80067f38dc43ef368c24bd2e
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/sections.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 9 |
3 files changed, 2 insertions, 17 deletions
diff --git a/arch/x86/include/asm/sections.h b/arch/x86/include/asm/sections.h index 71b32f2570ab..8ea1cfdbeabc 100644 --- a/arch/x86/include/asm/sections.h +++ b/arch/x86/include/asm/sections.h @@ -13,6 +13,4 @@ extern char __end_rodata_aligned[]; extern char __end_rodata_hpage_align[]; #endif -extern char __end_of_kernel_reserve[]; - #endif /* _ASM_X86_SECTIONS_H */ diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index bbe35bf879f5..dcbdf54fb5c1 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -836,14 +836,8 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) void __init setup_arch(char **cmdline_p) { - /* - * Reserve the memory occupied by the kernel between _text and - * __end_of_kernel_reserve symbols. Any kernel sections after the - * __end_of_kernel_reserve symbol must be explicitly reserved with a - * separate memblock_reserve() or they will be discarded. - */ memblock_reserve(__pa_symbol(_text), - (unsigned long)__end_of_kernel_reserve - (unsigned long)_text); + (unsigned long)__bss_stop - (unsigned long)_text); /* * Make sure page 0 is always reserved because on systems with diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index e2feacf921a0..4f062d33ef73 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -368,14 +368,6 @@ SECTIONS __bss_stop = .; } - /* - * The memory occupied from _text to here, __end_of_kernel_reserve, is - * automatically reserved in setup_arch(). Anything after here must be - * explicitly reserved using memblock_reserve() or it will be discarded - * and treated as available memory. - */ - __end_of_kernel_reserve = .; - . = ALIGN(PAGE_SIZE); .brk : AT(ADDR(.brk) - LOAD_OFFSET) { __brk_base = .; @@ -415,6 +407,7 @@ SECTIONS STABS_DEBUG DWARF_DEBUG + /* Sections to be discarded */ DISCARDS /DISCARD/ : { *(.eh_frame) |