x86/smp: fix non-SMP broken build due to redefinition of apic_id_is_primary_thread
authorVlastimil Babka <vbabka@suse.cz>
Tue, 14 Aug 2018 21:38:57 +0000 (23:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:13:01 +0000 (18:13 +0200)
commit9428a6a0ea7bd965fd61b81e83811214654b78e2
treef698103e3cb77097845765202ce537e000d12154
parente456004eb77734e274e520c83ad9be76736e622c
x86/smp: fix non-SMP broken build due to redefinition of apic_id_is_primary_thread

commit d0055f351e647f33f3b0329bff022213bf8aa085 upstream.

The function has an inline "return false;" definition with CONFIG_SMP=n
but the "real" definition is also visible leading to "redefinition of
‘apic_id_is_primary_thread’" compiler error.

Guard it with #ifdef CONFIG_SMP

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Fixes: 6a4d2657e048 ("x86/smp: Provide topology_is_primary_thread()")
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/apic/apic.c