]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/espfix: Init espfix on the boot CPU side
authorZhu Guihua <zhugh.fnst@cn.fujitsu.com>
Fri, 3 Jul 2015 09:37:19 +0000 (17:37 +0800)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 15 Dec 2017 04:21:13 +0000 (20:21 -0800)
commitc957190d1d12eac1f98a7440d1835d05e3e13882
tree6fb00b0d08e9b7a0b00df460a7b8b6a20087b10d
parent6dd943b6c82fcd0f88072b47f001a1cb8cb69e58
x86/espfix: Init espfix on the boot CPU side

As we alloc pages with GFP_KERNEL in init_espfix_ap() which is
called before we enable local irqs, so the lockdep sub-system
would (correctly) trigger a warning about the potentially
blocking API.

So we allocate them on the boot CPU side when the secondary CPU is
brought up by the boot CPU, and hand them over to the secondary
CPU.

And we use alloc_pages_node() with the secondary CPU's node, to
make sure the espfix stack is NUMA-local to the CPU that is
going to use it.

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/c97add2670e9abebb90095369f0cfc172373ac94.1435824469.git.zhugh.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Orabug: 26523661
(cherry picked from commit 20d5e4a9cd453991e2590a4c25230a99b42dee0c)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Tim Tianyang Chen <tianyang.chen@oracle.com>
arch/x86/kernel/espfix_64.c
arch/x86/kernel/smpboot.c