[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-26179670a68b7b365fbfe38afb043dcd2e1a4678@git.kernel.org>
Date: Tue, 20 Jun 2017 06:29:46 -0700
From: "tip-bot for Kirill A. Shutemov" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, peterz@...radead.org,
hpa@...or.com, tglx@...utronix.de, mingo@...nel.org,
fengguang.wu@...el.com
Subject: [tip:x86/mm] x86/boot/64: Put __startup_64() into .head.text
Commit-ID: 26179670a68b7b365fbfe38afb043dcd2e1a4678
Gitweb: http://git.kernel.org/tip/26179670a68b7b365fbfe38afb043dcd2e1a4678
Author: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
AuthorDate: Fri, 16 Jun 2017 14:30:24 +0300
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 20 Jun 2017 12:56:27 +0200
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 <kirill.shutemov@...ux.intel.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: kernel test robot <fengguang.wu@...el.com>
Cc: wfg@...ux.intel.com
Link: http://lkml.kernel.org/r/20170616113024.ajmif63cmcszry5a@black.fi.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/head64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 2b2ac38..46c3c73 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;
Powered by blists - more mailing lists