From patchwork Fri Apr 24 05:27:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47526 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 787C520553 for ; Fri, 24 Apr 2015 05:33:29 +0000 (UTC) Received: by wghm4 with SMTP id m4sf9144520wgh.2 for ; Thu, 23 Apr 2015 22:33:28 -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=cXB+ilVV8vRqowudoG5zicMdzu55DhErqn9TYgAljOI=; b=ZYFBdYFPlpBduQcQAoY5B0CGMDdI4thrptG9Gg0N90sMfpajZvHi/Cr+5vUgkrxoyk SCBLabmaZwRjssPNMA2xSsw4unIwesWwJ2WLCmioBvCo2QJyWn1MmCAvB3wY6J1BRWPU SNAN1VEcWxcLfgLGkWjPttZWbfLnLFzMDyKpRsXTlg3KKWk6joV9pGDtkZ6Gj6FPo4IR Cp/dioRI3vXZ8fxwFF2wIudujTdAYHZ2oFpuseEDTHsFzZ3sosI67f+u3uYONk6f2qH0 XI/KHC9x87E6E4oUgrGI+12fYtZHMFgBA7ngtoWUVsE4wqCYeWmglkfPJNYXgfrK8lpU uYlg== X-Gm-Message-State: ALoCoQlU9d7lpV8DkWKZXu1fJUIzjBrIXVTV12FdPZ0C2I9C79ooN6haazgZGbZCKVbLIomYuD1F X-Received: by 10.113.11.3 with SMTP id ee3mr3258523lbd.9.1429853608794; Thu, 23 Apr 2015 22:33:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.1 with SMTP id n1ls373497laa.87.gmail; Thu, 23 Apr 2015 22:33:28 -0700 (PDT) X-Received: by 10.112.132.9 with SMTP id oq9mr5430374lbb.26.1429853608522; Thu, 23 Apr 2015 22:33:28 -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 pf2si7490200lbc.2.2015.04.23.22.33.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 22:33:28 -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 lagv1 with SMTP id v1so27548370lag.3 for ; Thu, 23 Apr 2015 22:33:28 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr5317722lbb.76.1429853608394; Thu, 23 Apr 2015 22:33:28 -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 l1csp978435lbt; Thu, 23 Apr 2015 22:33:27 -0700 (PDT) X-Received: by 10.68.65.41 with SMTP id u9mr11495157pbs.155.1429853606628; Thu, 23 Apr 2015 22:33:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd10si15800741pdb.178.2015.04.23.22.33.25; Thu, 23 Apr 2015 22:33:26 -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 S1754550AbbDXFdZ (ORCPT + 2 others); Fri, 24 Apr 2015 01:33:25 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:34150 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545AbbDXFdZ (ORCPT ); Fri, 24 Apr 2015 01:33:25 -0400 Received: by oiko83 with SMTP id o83so32497650oik.1 for ; Thu, 23 Apr 2015 22:33:24 -0700 (PDT) X-Received: by 10.182.66.106 with SMTP id e10mr5699149obt.42.1429853604554; Thu, 23 Apr 2015 22:33:24 -0700 (PDT) Received: from localhost ([167.160.116.36]) by mx.google.com with ESMTPSA id my16sm6064837obc.25.2015.04.23.22.33.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 22:33:23 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: jslaby@suse.cz, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Will Deacon , Marc Zyngier Subject: [PATCH for 3.12.y stable 41/63] KVM: ARM/arm64: fix broken __percpu annotation Date: Fri, 24 Apr 2015 13:27:39 +0800 Message-Id: <1429853281-6136-42-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1429853281-6136-1-git-send-email-shannon.zhao@linaro.org> References: <1429853281-6136-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 bf801be..8eacf88 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 11059f1..ca18e3f 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -176,7 +176,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, ...);