Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andreas Schwab and committed by
Alexander Graf
48eaef05 73601775

+6 -1
+6 -1
arch/powerpc/kvm/book3s_hv.c
··· 86 86 87 87 /* CPU points to the first thread of the core */ 88 88 if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { 89 + #ifdef CONFIG_KVM_XICS 89 90 int real_cpu = cpu + vcpu->arch.ptid; 90 91 if (paca[real_cpu].kvm_hstate.xics_phys) 91 92 xics_wake_cpu(real_cpu); 92 - else if (cpu_online(cpu)) 93 + else 94 + #endif 95 + if (cpu_online(cpu)) 93 96 smp_send_reschedule(cpu); 94 97 } 95 98 put_cpu(); ··· 1145 1142 smp_wmb(); 1146 1143 #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) 1147 1144 if (vcpu->arch.ptid) { 1145 + #ifdef CONFIG_KVM_XICS 1148 1146 xics_wake_cpu(cpu); 1147 + #endif 1149 1148 ++vc->n_woken; 1150 1149 } 1151 1150 #endif