• 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
..
acpi Loading commit data...
asm-generic Loading commit data...
clocksource Loading commit data...
crypto Loading commit data...
drm Loading commit data...
dt-bindings Loading commit data...
keys Loading commit data...
kvm Loading commit data...
linux Loading commit data...
math-emu Loading commit data...
media Loading commit data...
memory Loading commit data...
misc Loading commit data...
net Loading commit data...
pcmcia Loading commit data...
ras Loading commit data...
rdma Loading commit data...
rxrpc Loading commit data...
scsi Loading commit data...
soc Loading commit data...
sound Loading commit data...
target Loading commit data...
trace Loading commit data...
uapi Loading commit data...
video Loading commit data...
xen Loading commit data...
Kbuild Loading commit data...