From patchwork Tue Jun 2 14:48:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49383 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 902EF20C3B for ; Tue, 2 Jun 2015 14:49:42 +0000 (UTC) Received: by wgez8 with SMTP id z8sf41143965wge.2 for ; Tue, 02 Jun 2015 07:49:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=GWEnYWp687Xcg2FD9BbYgR3Ec8r8HbV08iniZ+2/zIU=; b=KyKPqAIhbNFDR2+J2L1XaZ/l87SUYWR2kZ6IZNbMcVN14r32zdHVE4RBiXcJQtsklJ Kt6tPhp1SuuOMqaQSKG4rPBsdUSM8oXOL7cKXUqkOnjfOgjW3x6Sg+XVS6yGSMGYCwYP Wsj2xajGMu3qx2hokTIeICr8lipgVaiKUFpYC1y86CHOSVnIa7kgn2aBTBXeL3sEMmkz ybKWHjSwsqbXh6GZ0dbzSKLPWwDMM3TjDGJWFR6aVNUMMFozVoXKSMysI6LBgNB/qb7z JdvuZ8deiWqdN+6m3Gm7j+9SfiJ+SGJXk5Oijl+w4DNQZsM09kTgRX0qVNBd7n5qKWCS djlg== X-Gm-Message-State: ALoCoQli+yvwN95JfJp9xXgeNgSmlI9oVdClB5iAd+RisRyFtS2eZsAJbPGgvNVX0mkgtnvTjmlP X-Received: by 10.112.122.13 with SMTP id lo13mr12062920lbb.5.1433256581855; Tue, 02 Jun 2015 07:49:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.65 with SMTP id yg1ls708503lab.26.gmail; Tue, 02 Jun 2015 07:49:41 -0700 (PDT) X-Received: by 10.153.4.135 with SMTP id ce7mr26560874lad.44.1433256581696; Tue, 02 Jun 2015 07:49:41 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id vk4si15258997lbb.147.2015.06.02.07.49.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:49:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labpy14 with SMTP id py14so115672454lab.0 for ; Tue, 02 Jun 2015 07:49:41 -0700 (PDT) X-Received: by 10.112.182.4 with SMTP id ea4mr21570840lbc.35.1433256581571; Tue, 02 Jun 2015 07:49:41 -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.112.108.230 with SMTP id hn6csp3128510lbb; Tue, 2 Jun 2015 07:49:40 -0700 (PDT) X-Received: by 10.68.237.105 with SMTP id vb9mr13035912pbc.149.1433256578736; Tue, 02 Jun 2015 07:49:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv8si26697315pdb.173.2015.06.02.07.49.37; Tue, 02 Jun 2015 07:49:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932394AbbFBOth (ORCPT + 2 others); Tue, 2 Jun 2015 10:49:37 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:32864 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759332AbbFBOtg (ORCPT ); Tue, 2 Jun 2015 10:49:36 -0400 Received: by oiww2 with SMTP id w2so127364293oiw.0 for ; Tue, 02 Jun 2015 07:49:36 -0700 (PDT) X-Received: by 10.60.123.116 with SMTP id lz20mr7716438oeb.82.1433256576151; Tue, 02 Jun 2015 07:49:36 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id yo9sm9560675obc.3.2015.06.02.07.49.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:49:34 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Will Deacon , Marc Zyngier Subject: [PATCH for 3.14.y stable 08/32] KVM: ARM/arm64: fix broken __percpu annotation Date: Tue, 2 Jun 2015 22:48:03 +0800 Message-Id: <1433256507-7856-9-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Will Deacon commit 4000be423cb01a8d09de878bb8184511c49d4238 upstream. 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 Signed-off-by: Christoffer Dall Signed-off-by: Shannon Zhao --- 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 f92a7fb..df6e75e 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 518d000..3fb0946 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -177,7 +177,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, ...);