diff options
| author | Sudeep Holla <sudeep.holla@arm.com> | 2016-06-08 06:38:55 -0400 |
|---|---|---|
| committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-06-27 06:55:51 -0400 |
| commit | 0efce9da1255f13d910842b62cb14371044a3c50 (patch) | |
| tree | 7352d3b2d12aa356dd32993d1b2cda71232c676a /include/kvm | |
| parent | a0052191624e9bf8a8f9dc41b92ab5f252566c3c (diff) | |
arm64: KVM: fix build with CONFIG_ARM_PMU disabled
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 <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include/kvm')
| -rw-r--r-- | include/kvm/arm_pmu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index fe389ac31489..92e7e97ca8ff 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h | |||
| @@ -18,13 +18,13 @@ | |||
| 18 | #ifndef __ASM_ARM_KVM_PMU_H | 18 | #ifndef __ASM_ARM_KVM_PMU_H |
| 19 | #define __ASM_ARM_KVM_PMU_H | 19 | #define __ASM_ARM_KVM_PMU_H |
| 20 | 20 | ||
| 21 | #ifdef CONFIG_KVM_ARM_PMU | ||
| 22 | |||
| 23 | #include <linux/perf_event.h> | 21 | #include <linux/perf_event.h> |
| 24 | #include <asm/perf_event.h> | 22 | #include <asm/perf_event.h> |
| 25 | 23 | ||
| 26 | #define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1) | 24 | #define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1) |
| 27 | 25 | ||
| 26 | #ifdef CONFIG_KVM_ARM_PMU | ||
| 27 | |||
| 28 | struct kvm_pmc { | 28 | struct kvm_pmc { |
| 29 | u8 idx; /* index into the pmu->pmc array */ | 29 | u8 idx; /* index into the pmu->pmc array */ |
| 30 | struct perf_event *perf_event; | 30 | struct perf_event *perf_event; |
