[PATCH 3.16 013/366] arch/x86/kernel/cpu/common.c: fix unused symbol warning

From: Ben Hutchings
Date: Sun Nov 11 2018 - 15:42:30 EST


3.16.61-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

commit e48510f45107613bf14060eeabd658c49a044242 upstream.

x86_64 allnoconfig:

arch/x86/kernel/cpu/common.c:968: warning: 'syscall32_cpu_init' defined but not used

Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/cpu/common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1156,6 +1156,7 @@ static void vgetcpu_set_mode(void)
vgetcpu_mode = VGETCPU_LSL;
}

+#ifdef CONFIG_IA32_EMULATION
/* May not be __init: called during resume */
static void syscall32_cpu_init(void)
{
@@ -1167,7 +1168,8 @@ static void syscall32_cpu_init(void)

wrmsrl(MSR_CSTAR, ia32_cstar_target);
}
-#endif
+#endif /* CONFIG_IA32_EMULATION */
+#endif /* CONFIG_X86_64 */

#ifdef CONFIG_X86_32
void enable_sep_cpu(void)