• Sudeep Holla's avatar
    arm64: KVM: fix build with CONFIG_ARM_PMU disabled · 0efce9da
    Sudeep Holla authored
    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: default avatarSudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
    0efce9da
Name
Last commit
Last update
..
vgic Loading commit data...
arm_arch_timer.h Loading commit data...
arm_pmu.h Loading commit data...
arm_vgic.h Loading commit data...
iodev.h Loading commit data...