diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2013-12-30 09:36:56 -0500 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-01-27 10:00:52 -0500 |
commit | 48eaef0518a565d3852e301c860e1af6a6db5a84 (patch) | |
tree | 3eeeebb2723c0e22093418807b3a7ca1de38d39c /arch/powerpc | |
parent | 736017752d2f6ed0d64f5e15cf48e79779b11c85 (diff) |
KVM: PPC: Book3S HV: use xics_wake_cpu only when defined
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
CC: stable@vger.kernel.org
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 461f55566167..7e1813ceabc1 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -86,10 +86,13 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu) | |||
86 | 86 | ||
87 | /* CPU points to the first thread of the core */ | 87 | /* CPU points to the first thread of the core */ |
88 | if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { | 88 | if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { |
89 | #ifdef CONFIG_KVM_XICS | ||
89 | int real_cpu = cpu + vcpu->arch.ptid; | 90 | int real_cpu = cpu + vcpu->arch.ptid; |
90 | if (paca[real_cpu].kvm_hstate.xics_phys) | 91 | if (paca[real_cpu].kvm_hstate.xics_phys) |
91 | xics_wake_cpu(real_cpu); | 92 | xics_wake_cpu(real_cpu); |
92 | else if (cpu_online(cpu)) | 93 | else |
94 | #endif | ||
95 | if (cpu_online(cpu)) | ||
93 | smp_send_reschedule(cpu); | 96 | smp_send_reschedule(cpu); |
94 | } | 97 | } |
95 | put_cpu(); | 98 | put_cpu(); |
@@ -1142,7 +1145,9 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu) | |||
1142 | smp_wmb(); | 1145 | smp_wmb(); |
1143 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) | 1146 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) |
1144 | if (vcpu->arch.ptid) { | 1147 | if (vcpu->arch.ptid) { |
1148 | #ifdef CONFIG_KVM_XICS | ||
1145 | xics_wake_cpu(cpu); | 1149 | xics_wake_cpu(cpu); |
1150 | #endif | ||
1146 | ++vc->n_woken; | 1151 | ++vc->n_woken; |
1147 | } | 1152 | } |
1148 | #endif | 1153 | #endif |