[PATCH] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

STALE5394d

3 messages, 2 authors, 2011-11-12 · open the first message on its own page

[PATCH] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

From: Michael Neuling <hidden>
Date: 2011-11-11 02:03:20

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.

Signed-off-by: Michael Neuling <redacted>
---
 arch/powerpc/kvm/book3s_hv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-ozlabs/arch/powerpc/kvm/book3s_hv.c
===================================================================
--- linux-ozlabs.orig/arch/powerpc/kvm/book3s_hv.c
+++ 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();

Re: [PATCH] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

From: Alexander Graf <hidden>
Date: 2011-11-11 16:01:43

On 11/11/2011 03:03 AM, Michael Neuling wrote:
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.

Signed-off-by: Michael Neuling<redacted>
Thanks, applied to kvm-ppc-next. Please CC kvm-ppc@vger next time :).


Alex

Re: [PATCH] powerpc kvm: fix kvmppc_start_thread() for CONFIG_SMP=N

From: Michael Neuling <hidden>
Date: 2011-11-12 04:07:16

In message [off-list ref] you wrote:
On 11/11/2011 03:03 AM, Michael Neuling wrote:
quoted
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.

Signed-off-by: Michael Neuling<redacted>
Thanks, applied to kvm-ppc-next. Please CC kvm-ppc@vger next time :).
Thanks will do.

Mikey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help