From patchwork Wed Mar 29 10:55:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kirjanov X-Patchwork-Id: 744715 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vtPrm5dtDz9s2P for ; Wed, 29 Mar 2017 21:58:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linux-powerpc-org.20150623.gappssmtp.com header.i=@linux-powerpc-org.20150623.gappssmtp.com header.b="w7fzOM8L"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vtPrm4XHZzDqKq for ; Wed, 29 Mar 2017 21:58:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linux-powerpc-org.20150623.gappssmtp.com header.i=@linux-powerpc-org.20150623.gappssmtp.com header.b="w7fzOM8L"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vtPq90fT2zDqH3 for ; Wed, 29 Mar 2017 21:57:25 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linux-powerpc-org.20150623.gappssmtp.com header.i=@linux-powerpc-org.20150623.gappssmtp.com header.b="w7fzOM8L"; dkim-atps=neutral Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by bilbo.ozlabs.org (Postfix) with ESMTP id 3vtPq901hpz8t3x for ; Wed, 29 Mar 2017 21:57:25 +1100 (AEDT) Received: by ozlabs.org (Postfix) id 3vtPq86cb9z9s77; Wed, 29 Mar 2017 21:57:24 +1100 (AEDT) Delivered-To: linuxppc-dev@ozlabs.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vtPq775MNz9s3s for ; Wed, 29 Mar 2017 21:57:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linux-powerpc-org.20150623.gappssmtp.com header.i=@linux-powerpc-org.20150623.gappssmtp.com header.b="w7fzOM8L"; dkim-atps=neutral Received: by mail-lf0-x244.google.com with SMTP id v2so1224580lfi.2 for ; Wed, 29 Mar 2017 03:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-powerpc-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ntzlMV+D5DmX+91S+AXE+wHfB+yWvHUXnIWiRd+vOCE=; b=w7fzOM8Lw6n6ZTpoV+itqhiAs4a1CPJg4nvWCX/GQVvAgKug5j61t96QMkRYRl7/l3 19IuUkO3mc2V99hfVlKMisfEcIktncyJc8OTybJLtiyeNZOagSnMYSYJOsQlPaK1YLqU 1Xpj2p7Pu/mVDQrLhdHaSCxuc6frLZqwUa4t1FPzwtkeU5Y+ak7pB3evOGbXDJWUDb1F jYJDbV3NbG+AN8nBXU/srHH+sb65W3ABX57L8SjkTzgfWfxU70v8gscDqt26a/QGNGMJ EhrReL84HkbFBU+mUnudvhe7fYSA8edW90FtecH6z/HteVBbWrg97P+NlQJ/ryl2Uc+W S+Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ntzlMV+D5DmX+91S+AXE+wHfB+yWvHUXnIWiRd+vOCE=; b=bo+368TsSqt8Ylksl1MY0tE2g5plxoVXCO6LOP5r7Vwk8e+EjeJHbd/3oGBkiXN/r8 /wPtXkmgaA8851yGoo+5ZQaqYaQ88n5lf2H51Pi9E3tbPwHpJxJkPmrt8m7VjHmDiZvk y0q5EcHqYkhJVP3Yen5FH2Rdtkbn8yBf/jP6pftuQDo65S7OI8K/WIMchq03bgs35Jsc qjPVSzkC+5SXIM1Tg1CQb+ioInwOOeDt48T8yt1zPi/dMrxTFN86Xjs9svw1hE9kE0YE 2QV3g74Zzumy/OpihjEt9dnpycVLactKr7ZLnmpZyk1Zv+F6/aTmq7ajM5irulZVDlbS gj4Q== X-Gm-Message-State: AFeK/H1YCnMh6o1DIhq+vxQktkolDJldLVVxdl6/4bmZdO8ptcFa1RxvekJ5gpuic/nRZw== X-Received: by 10.46.69.133 with SMTP id s127mr3338342lja.44.1490785041046; Wed, 29 Mar 2017 03:57:21 -0700 (PDT) Received: from power.oil.ru.ru ([195.54.192.103]) by smtp.gmail.com with ESMTPSA id h1sm1249739lfk.33.2017.03.29.03.57.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 03:57:20 -0700 (PDT) From: Denis Kirjanov To: linuxppc-dev@ozlabs.org Subject: [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca Date: Wed, 29 Mar 2017 06:55:37 -0400 Message-Id: <1490784937-10593-1-git-send-email-kda@linux-powerpc.org> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Denis Kirjanov Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" with CONFIG_DEBUG_PREEMPT get_paca produces the following warning in kvmppc_book3s_init_hv since we are getting into the smp_processor_id debugging code There is no real issue with the xics_phys field. If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be non-zero on them all. Therefore this is not fixing any actual problem, just the warning. [ 138.521188] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/5596 [ 138.521308] caller is .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv] [ 138.521404] CPU: 5 PID: 5596 Comm: modprobe Not tainted 4.11.0-rc3-00022-gc7e790c #1 [ 138.521509] Call Trace: [ 138.521563] [c0000007d018b810] [c0000000023eef10] .dump_stack+0xe4/0x150 (unreliable) [ 138.521694] [c0000007d018b8a0] [c000000001f6ec04] .check_preemption_disabled+0x134/0x150 [ 138.521829] [c0000007d018b940] [d00000000a010274] .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv] [ 138.521963] [c0000007d018ba00] [c00000000191d5cc] .do_one_initcall+0x5c/0x1c0 [ 138.522082] [c0000007d018bad0] [c0000000023e9494] .do_init_module+0x84/0x240 [ 138.522201] [c0000007d018bb70] [c000000001aade18] .load_module+0x1f68/0x2a10 [ 138.522319] [c0000007d018bd20] [c000000001aaeb30] .SyS_finit_module+0xc0/0xf0 [ 138.522439] [c0000007d018be30] [c00000000191baec] system_call+0x38/0xfc Signed-off-by: Denis Kirjanov --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 1ec86d9..cb4ff36 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -3930,7 +3930,7 @@ static int kvmppc_book3s_init_hv(void) * indirectly, via OPAL. */ #ifdef CONFIG_SMP - if (!get_paca()->kvm_hstate.xics_phys) { + if (!local_paca->kvm_hstate.xics_phys) { struct device_node *np; np = of_find_compatible_node(NULL, NULL, "ibm,opal-intc");