From patchwork Tue Aug 26 14:13:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 36030 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 790E42054F for ; Tue, 26 Aug 2014 14:15:56 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf42736381qac.8 for ; Tue, 26 Aug 2014 07:15:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=OgiVLsuvj6Y9UXKzZOhNdgoNoE+b5SMXeueblVtCHaM=; b=HNYrNDEKk68+kiMWVWOkqQFBfbzLGkFr9I6Aa+rtI0UevjM44CLF05zvFrgr5klXA8 aQ1kw3FRoXJiJQaYQ7kRMgFrlyHMev9tsp2n3GypMZSavGISRUBKFvW6fFJWd34eT42e 5gNplylkGIISID+eTLKYnY6Cs3gXgBqL5FyHfLORv+JN+llw/fEUA48MCy8IVabm1Xhe fD6psfcmFZnsyQ/7iCdr2cFlxIDb7rjSUKvmya9mykvLPfFCO/SQ6RdDkXZUDyj5yLpx LUQmrfQ2x22K+9era3jHyVTj0fZttcHO5vxy8HWP114SXm8yN+ocTSUTMVGMrueIecTo OGsw== X-Gm-Message-State: ALoCoQnuGm586rTBr4CJBMhOw+9lVIvbpNZwoVaT25WYZszoNw72F9rXv9rL/pXay0P1SZ3TKX8u X-Received: by 10.224.37.6 with SMTP id v6mr18339975qad.9.1409062556090; Tue, 26 Aug 2014 07:15:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.240 with SMTP id n103ls2572057qgd.13.gmail; Tue, 26 Aug 2014 07:15:55 -0700 (PDT) X-Received: by 10.236.136.168 with SMTP id w28mr2038557yhi.132.1409062555794; Tue, 26 Aug 2014 07:15:55 -0700 (PDT) Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) by mx.google.com with ESMTPS id h44si2595862yhh.70.2014.08.26.07.15.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 07:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.43 as permitted sender) client-ip=209.85.213.43; Received: by mail-yh0-f43.google.com with SMTP id 29so11832901yhl.16 for ; Tue, 26 Aug 2014 07:15:55 -0700 (PDT) X-Received: by 10.221.5.137 with SMTP id og9mr24286304vcb.18.1409062555685; Tue, 26 Aug 2014 07:15:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp202771vcb; Tue, 26 Aug 2014 07:15:55 -0700 (PDT) X-Received: by 10.68.69.69 with SMTP id c5mr13733963pbu.155.1409062554821; Tue, 26 Aug 2014 07:15:54 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id za17si4775220pab.41.2014.08.26.07.15.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 07:15:54 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMHWL-0001ZT-VV; Tue, 26 Aug 2014 14:14:49 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMHVG-00087F-PD for linux-arm-kernel@lists.infradead.org; Tue, 26 Aug 2014 14:13:44 +0000 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.34]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s7QEDHwo011792; Tue, 26 Aug 2014 15:13:17 +0100 (BST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 57D1D1AE0612; Tue, 26 Aug 2014 15:13:37 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/11] KVM: ARM/arm64: fix broken __percpu annotation Date: Tue, 26 Aug 2014 15:13:21 +0100 Message-Id: <1409062410-25891-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.0.rc1 In-Reply-To: <1409062410-25891-1-git-send-email-will.deacon@arm.com> References: <1409062410-25891-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140826_071343_214209_ED1C064E X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Marc Zyngier , catalin.marinas@arm.com, Will Deacon , Christoffer Dall X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.deacon@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Running sparse results in a bunch of noisy address space mismatches thanks to the broken __percpu annotation on kvm_get_running_vcpus. This function returns a pcpu pointer to a pointer, not a pointer to a pcpu pointer. This patch fixes the annotation, which kills the warnings from sparse. Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Will Deacon Acked-by: Marc Zyngier --- arch/arm/kvm/arm.c | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index a99e0cdf8ba2..00a5982ca5bc 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -82,7 +82,7 @@ struct kvm_vcpu *kvm_arm_get_running_vcpu(void) /** * kvm_arm_get_running_vcpus - get the per-CPU array of currently running vcpus. */ -struct kvm_vcpu __percpu **kvm_get_running_vcpus(void) +struct kvm_vcpu * __percpu *kvm_get_running_vcpus(void) { return &kvm_arm_running_vcpu; } diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 44094e559848..50431d36732b 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -193,7 +193,7 @@ static inline int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) } struct kvm_vcpu *kvm_arm_get_running_vcpu(void); -struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); +struct kvm_vcpu * __percpu *kvm_get_running_vcpus(void); u64 kvm_call_hyp(void *hypfn, ...);