diff options
author | Kirill A. Shutemov <[email protected]> | 2017-06-16 14:30:24 +0300 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-06-20 12:56:27 +0200 |
commit | 26179670a68b7b365fbfe38afb043dcd2e1a4678 (patch) | |
tree | c8757f9b9bfab3e090159a198c0141900851a776 | |
parent | 8624c1f66f0fef640d0e044ddf1eb60e77e76df6 (diff) |
x86/boot/64: Put __startup_64() into .head.text
Put __startup_64() and fixup_pointer() into .head.text section to make
sure it's always near startup_64() and always callable.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: kernel test robot <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | arch/x86/kernel/head64.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 2b2ac381195a..46c3c73e7f43 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -38,12 +38,14 @@ extern pmd_t early_dynamic_pgts[EARLY_DYNAMIC_PAGE_TABLES][PTRS_PER_PMD]; static unsigned int __initdata next_early_pgt; pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); -static void __init *fixup_pointer(void *ptr, unsigned long physaddr) +#define __head __section(.head.text) + +static void __head *fixup_pointer(void *ptr, unsigned long physaddr) { return ptr - (void *)_text + (void *)physaddr; } -void __init __startup_64(unsigned long physaddr) +void __head __startup_64(unsigned long physaddr) { unsigned long load_delta, *p; pgdval_t *pgd; |