[PATCH] arm64: KVM: fix build with CONFIG_ARM_PMU disabled

Marc Zyngier marc.zyngier at arm.com
Wed Jun 8 03:48:13 PDT 2016


On 08/06/16 11:38, Sudeep Holla wrote:
> 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 at linaro.org>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Signed-off-by: Sudeep Holla <sudeep.holla at arm.com>

Acked-by: Marc Zyngier <marc.zyngier at arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list