From patchwork Thu Jun 30 13:39:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 71245 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp400561qgy; Thu, 30 Jun 2016 06:40:19 -0700 (PDT) X-Received: by 10.98.110.195 with SMTP id j186mr21586472pfc.49.1467294017397; Thu, 30 Jun 2016 06:40:17 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id xo8si4581763pac.60.2016.06.30.06.40.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 06:40:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIcBb-0006PI-Po; Thu, 30 Jun 2016 13:39:19 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIcBS-0006GV-KA for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2016 13:39:11 +0000 Received: by mail-wm0-x234.google.com with SMTP id a66so119194420wme.0 for ; Thu, 30 Jun 2016 06:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QKQs/mqJ4+w6fLtw5gSfMupZEqTXcN9DElZQotCUE8I=; b=G0YyIKX257qqKRo4hQBrgPJEK3q438vdNMPnfeWYuB2cACOZ22PUaovUWIU+Mir9b4 5DlXAI2rradFW//I9pgadHeiTTGgyk0EDm0EKmcEj/EUmBoeGHHBC+14Je9QW8713gGM oKrggcXZ7+Td7SF0G4bRf4dcvwSVmZbYPilVg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QKQs/mqJ4+w6fLtw5gSfMupZEqTXcN9DElZQotCUE8I=; b=j+szZhkyFFErpU66Ho2dZPGPrjcU62s+z3hIR80PYYli/sieHt67MRqLqnF+o9L4ei p8B4N6N5Y9G24QoYWueZdDqNF0AOggecSNbW2PLUm19QM8kjfWU+bdmk3InvYvLi+TbZ 3NaNsdTuJG3lyGTnkfbrSmb8j0lwGVf0jI6z3BwOeCnhbdWukeOjzwJpt7ax50m61E/m zae+395uyQcgE+iz4D6cW28auD4OXy7/k2XxTbX90tTvgMsgppJvYAfyI/+Th8wClz/Q 5k6X/wAKFBL6J5PCCFhl+dq4jadPmWJGm6wSkRjIlx1GL5YWqHXlmY3ZP4KfAVqQ/HKH 9Fcg== X-Gm-Message-State: ALyK8tK+/cgw65cF35Wvrgu7Jtdpt9Z05SG2YSzf74e3B6CUSX6JLo7S46JebCuMht/1HA8R X-Received: by 10.194.123.166 with SMTP id mb6mr15243202wjb.94.1467293929125; Thu, 30 Jun 2016 06:38:49 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id yr4sm646216wjc.18.2016.06.30.06.38.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jun 2016 06:38:48 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 1/2] arm64: KVM: fix build with CONFIG_ARM_PMU disabled Date: Thu, 30 Jun 2016 15:39:36 +0200 Message-Id: <20160630133937.2654-2-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160630133937.2654-1-christoffer.dall@linaro.org> References: <20160630133937.2654-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160630_063910_834002_D828B736 X-CRM114-Status: GOOD ( 11.64 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Sudeep Holla , kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Sudeep Holla When CONFIG_ARM_PMU is disabled, we get the following build error: arch/arm64/kvm/sys_regs.c: In function 'pmu_counter_idx_valid': arch/arm64/kvm/sys_regs.c:564:27: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) if (idx >= val && idx != ARMV8_PMU_CYCLE_IDX) ^ arch/arm64/kvm/sys_regs.c:564:27: note: each undeclared identifier is reported only once for each function it appears in arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evcntr': arch/arm64/kvm/sys_regs.c:592:10: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) idx = ARMV8_PMU_CYCLE_IDX; ^ arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evtyper': arch/arm64/kvm/sys_regs.c:638:14: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) if (idx == ARMV8_PMU_CYCLE_IDX) ^ arch/arm64/kvm/hyp/switch.c:86:15: error: 'ARMV8_PMU_USERENR_MASK' undeclared (first use in this function) write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0); This patch fixes the build with CONFIG_ARM_PMU disabled. Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Sudeep Holla Signed-off-by: Christoffer Dall --- include/kvm/arm_pmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index fe389ac..92e7e97 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h @@ -18,13 +18,13 @@ #ifndef __ASM_ARM_KVM_PMU_H #define __ASM_ARM_KVM_PMU_H -#ifdef CONFIG_KVM_ARM_PMU - #include #include #define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1) +#ifdef CONFIG_KVM_ARM_PMU + struct kvm_pmc { u8 idx; /* index into the pmu->pmc array */ struct perf_event *perf_event;