From patchwork Mon May 4 01:52:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 775812121F for ; Mon, 4 May 2015 01:55:19 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf40431612wgi.3 for ; Sun, 03 May 2015 18:55:18 -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=mRq0PWCGUG8MRcnit7MmG5+a5qY4OjlkK+fZ2WUOc/mLic9FXtYH12jjVb5TetMcKw wx4LahKb/OK9imBn+Mkjv+Nt3UECd2kdNvSEeJ+GrlOBi5YvyKNUDTAbP4tlpL+TjCq9 VReKSwwz4M6K308R0cZlPDrDlzQdTvxuX+qa+irGI1ozTLj6wRYhrj4R7HspaW2CDC7X lVxjrNeA6QpKYM579+2cEqtr5jv/W6P6Gp6eSQGPxd8CSEvVn2pcyePgmAGP8DQcxjbA kfoa6udiftsvF5M82zgzuqBwhNfUlNfI5TvdIRuoVMx7tPV14eOTZNvekU4HNvpX011/ 9xug== X-Gm-Message-State: ALoCoQkMhMYLv1lS1Z2Ueg7T1ZgYW9JyDjKchhs3foA6OC6KnTXtABcwN1cDhe3VaqBxYozPeSMv X-Received: by 10.152.116.115 with SMTP id jv19mr16957606lab.9.1430704518744; Sun, 03 May 2015 18:55:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.38 with SMTP id jt6ls768266lab.101.gmail; Sun, 03 May 2015 18:55:18 -0700 (PDT) X-Received: by 10.112.204.72 with SMTP id kw8mr17644224lbc.88.1430704518463; Sun, 03 May 2015 18:55:18 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id qf3si9072418lbb.143.2015.05.03.18.55.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by laat2 with SMTP id t2so95040202laa.1 for ; Sun, 03 May 2015 18:55:18 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr17257030lah.76.1430704518364; Sun, 03 May 2015 18:55:18 -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.67.65 with SMTP id l1csp1412899lbt; Sun, 3 May 2015 18:55:17 -0700 (PDT) X-Received: by 10.68.179.67 with SMTP id de3mr38125687pbc.85.1430704516630; Sun, 03 May 2015 18:55:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.55.15; Sun, 03 May 2015 18:55:16 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbbEDBzP (ORCPT + 2 others); Sun, 3 May 2015 21:55:15 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34197 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbbEDBzO (ORCPT ); Sun, 3 May 2015 21:55:14 -0400 Received: by pacyx8 with SMTP id yx8so147792784pac.1 for ; Sun, 03 May 2015 18:55:14 -0700 (PDT) X-Received: by 10.68.104.66 with SMTP id gc2mr38066173pbb.29.1430704514146; Sun, 03 May 2015 18:55:14 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id gj5sm11021536pbb.22.2015.05.03.18.55.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:55:13 -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 23/47] KVM: ARM/arm64: fix broken __percpu annotation Date: Mon, 4 May 2015 09:52:18 +0800 Message-Id: <1430704362-6292-24-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-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.42 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, ...);