Skip to contentSkip to conversation

powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

PATCH Applied Michael Neuling 2 participants 3 messages Nov 11, 2011 – Nov 12, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

Currently kvmppc_start_thread() tries to wake other SMT threads via xics_wake_cpu(). Unfortunately xics_wake_cpu only exists when CONFIG_SMP=Y so when compiling with CONFIG_SMP=N we get:

arch/powerpc/kvm/built-in.o: In function `.kvmppc_start_thread':
book3s_hv.c:(.text+0xa1e0): undefined reference to `.xics_wake_cpu'

The following should be fine since kvmppc_start_thread() shouldn't called to start non-zero threads when SMP=N since threads_per_core=1.

---
 arch/powerpc/kvm/book3s_hv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/book3s_hv.c +1 -1
Index: linux-ozlabs/arch/powerpc/kvm/book3s_hv.c
===================================================================
@@ -538,7 +538,7 @@ static void kvmppc_start_thread(struct k
 	tpaca->kvm_hstate.napping = 0;
 	vcpu->cpu = vc->pcpu;
 	smp_wmb();
-#ifdef CONFIG_PPC_ICP_NATIVE
+#if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP)
 	if (vcpu->arch.ptid) {
 		tpaca->cpu_start = 0x80;
 		wmb();
#1 lore raw
Quoted 11 lines · Michael Neuling

Currently kvmppc_start_thread() tries to wake other SMT threads via xics_wake_cpu(). Unfortunately xics_wake_cpu only exists when CONFIG_SMP=Y so when compiling with CONFIG_SMP=N we get:

arch/powerpc/kvm/built-in.o: In function `.kvmppc_start_thread':

   book3s_hv.c:(.text+0xa1e0): undefined reference to `.xics_wake_cpu'

The following should be fine since kvmppc_start_thread() shouldn't called to start non-zero threads when SMP=N since threads_per_core=1.

Thanks, applied to kvm-ppc-next. Please CC kvm-ppc@vger next time :).

Alex

#2 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines · Michael Neuling

Currently kvmppc_start_thread() tries to wake other SMT threads via xics_wake_cpu(). Unfortunately xics_wake_cpu only exists when CONFIG_SMP=Y so when compiling with CONFIG_SMP=N we get:

arch/powerpc/kvm/built-in.o: In function `.kvmppc_start_thread':

   book3s_hv.c:(.text+0xa1e0): undefined reference to `.xics_wake_cpu'
Quoted 6 lines
Quoted 4 lines

The following should be fine since kvmppc_start_thread() shouldn't called to start non-zero threads when SMP=N since threads_per_core=1.

Thanks, applied to kvm-ppc-next. Please CC kvm-ppc@vger next time :).

Thanks will do.

Mikey