From patchwork Mon Dec 30 14:36:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 305782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 775532C00BF for ; Tue, 31 Dec 2013 01:37:06 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755946Ab3L3OhF (ORCPT ); Mon, 30 Dec 2013 09:37:05 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:59166 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755944Ab3L3OhE (ORCPT ); Mon, 30 Dec 2013 09:37:04 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3dtLnV3vCzz3hjDW for ; Mon, 30 Dec 2013 15:36:58 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3dtLnQ0lx9zbbfY for ; Mon, 30 Dec 2013 15:36:58 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id rwXtn1nRgWCK for ; Mon, 30 Dec 2013 15:36:56 +0100 (CET) X-Auth-Info: FQFXJqqVRpswyvvcEKSepvd2j5stpteVBmAt5ioHuNY= Received: from igel.home (ppp-88-217-56-171.dynamic.mnet-online.de [88.217.56.171]) by mail.mnet-online.de (Postfix) with ESMTPA for ; Mon, 30 Dec 2013 15:36:56 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id A8D0F2C01C9; Mon, 30 Dec 2013 15:36:56 +0100 (CET) From: Andreas Schwab To: kvm-ppc@vger.kernel.org Subject: [PATCH] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined X-Yow: .. my NOSE is NUMB! Date: Mon, 30 Dec 2013 15:36:56 +0100 Message-ID: <874n5qiewn.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Signed-off-by: Andreas Schwab --- arch/powerpc/kvm/book3s_hv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index b51d5db..edeac10 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -85,10 +85,13 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu) /* CPU points to the first thread of the core */ if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { +#ifdef CONFIG_KVM_XICS int real_cpu = cpu + vcpu->arch.ptid; if (paca[real_cpu].kvm_hstate.xics_phys) xics_wake_cpu(real_cpu); - else if (cpu_online(cpu)) + else +#endif + if (cpu_online(cpu)) smp_send_reschedule(cpu); } put_cpu(); @@ -1189,7 +1192,9 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu) smp_wmb(); #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) if (vcpu->arch.ptid) { +#ifdef CONFIG_KVM_XICS xics_wake_cpu(cpu); +#endif ++vc->n_woken; } #endif