From: tip-bot for Zhu Guihua <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: luto@kernel.org, peterz@infradead.org,
torvalds@linux-foundation.org, hpa@zytor.com,
zhugh.fnst@cn.fujitsu.com, bp@alien8.de,
linux-kernel@vger.kernel.org, mingo@kernel.org,
luto@amacapital.net, tglx@linutronix.de
Subject: [tip:x86/urgent] x86/espfix: Add 'cpu' parameter to init_espfix_ap()
Date: Mon, 6 Jul 2015 08:38:46 -0700 [thread overview]
Message-ID: <tip-1db875631f8d5bbf497f67e47f254eece888d51d@git.kernel.org> (raw)
In-Reply-To: <cde3fcf1b3211f3f03feb1a995bce3fee850f0fc.1435824469.git.zhugh.fnst@cn.fujitsu.com>
Commit-ID: 1db875631f8d5bbf497f67e47f254eece888d51d
Gitweb: http://git.kernel.org/tip/1db875631f8d5bbf497f67e47f254eece888d51d
Author: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
AuthorDate: Fri, 3 Jul 2015 17:37:18 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 6 Jul 2015 15:00:33 +0200
x86/espfix: Add 'cpu' parameter to init_espfix_ap()
Add a CPU index parameter to init_espfix_ap(), so that the
parameter could be propagated to the function for espfix
page allocation.
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Cc: <bp@alien8.de>
Cc: <luto@amacapital.net>
Cc: <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/cde3fcf1b3211f3f03feb1a995bce3fee850f0fc.1435824469.git.zhugh.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/espfix.h | 2 +-
arch/x86/kernel/espfix_64.c | 7 +++----
arch/x86/kernel/smpboot.c | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/espfix.h b/arch/x86/include/asm/espfix.h
index 99efebb..ca3ce9a 100644
--- a/arch/x86/include/asm/espfix.h
+++ b/arch/x86/include/asm/espfix.h
@@ -9,7 +9,7 @@ DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack);
DECLARE_PER_CPU_READ_MOSTLY(unsigned long, espfix_waddr);
extern void init_espfix_bsp(void);
-extern void init_espfix_ap(void);
+extern void init_espfix_ap(int cpu);
#endif /* CONFIG_X86_64 */
diff --git a/arch/x86/kernel/espfix_64.c b/arch/x86/kernel/espfix_64.c
index f5d0730..1fb0e00 100644
--- a/arch/x86/kernel/espfix_64.c
+++ b/arch/x86/kernel/espfix_64.c
@@ -131,12 +131,12 @@ void __init init_espfix_bsp(void)
init_espfix_random();
/* The rest is the same as for any other processor */
- init_espfix_ap();
+ init_espfix_ap(0);
}
-void init_espfix_ap(void)
+void init_espfix_ap(int cpu)
{
- unsigned int cpu, page;
+ unsigned int page;
unsigned long addr;
pud_t pud, *pud_p;
pmd_t pmd, *pmd_p;
@@ -149,7 +149,6 @@ void init_espfix_ap(void)
if (likely(this_cpu_read(espfix_stack)))
return; /* Already initialized */
- cpu = smp_processor_id();
addr = espfix_base_addr(cpu);
page = cpu/ESPFIX_STACKS_PER_PAGE;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 8add66b..6f5abac 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -242,7 +242,7 @@ static void notrace start_secondary(void *unused)
* Enable the espfix hack for this CPU
*/
#ifdef CONFIG_X86_ESPFIX64
- init_espfix_ap();
+ init_espfix_ap(smp_processor_id());
#endif
/*
next prev parent reply other threads:[~2015-07-06 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 9:37 [PATCH v3 0/2] x86, espfix: silence warning on espfix initialization for ap Zhu Guihua
2015-07-03 9:37 ` [PATCH v3 1/2] espfix: add cpu parameter to init_espfix_ap() Zhu Guihua
2015-07-06 15:38 ` tip-bot for Zhu Guihua [this message]
2015-07-03 9:37 ` [PATCH v3 2/2] x86, espfix: init espfix on the boot cpu side Zhu Guihua
2015-07-06 15:39 ` [tip:x86/urgent] x86/espfix: Init espfix on the boot CPU side tip-bot for Zhu Guihua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-1db875631f8d5bbf497f67e47f254eece888d51d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=zhugh.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome