mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
hv_exc: Remove PMC0 CNT enable shadowing from fast sysreg path
This is outside the hv_exc_entry/hv_exc_exit bracketing now, so modify the register directly. We only stop the PMCs when we go into the slowpath. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
db598aa4cf
commit
2c531aa7ae
1 changed files with 2 additions and 4 deletions
|
@ -283,13 +283,11 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss)
|
|||
case SYSREG_ISS(SYS_IMP_APL_PMCR0):
|
||||
if (is_read) {
|
||||
u64 val = (mrs(SYS_IMP_APL_PMCR0) & ~PMCR0_IMODE_MASK) | PERCPU(pmc_irq_mode);
|
||||
regs[rt] =
|
||||
val | (PERCPU(pmc_pending) ? PMCR0_IACT : 0) | PERCPU(exc_entry_pmcr0_cnt);
|
||||
regs[rt] = val | (PERCPU(pmc_pending) ? PMCR0_IACT : 0);
|
||||
} else {
|
||||
PERCPU(pmc_pending) = !!(regs[rt] & PMCR0_IACT);
|
||||
PERCPU(pmc_irq_mode) = regs[rt] & PMCR0_IMODE_MASK;
|
||||
PERCPU(exc_entry_pmcr0_cnt) = regs[rt] & PMCR0_CNT_MASK;
|
||||
msr(SYS_IMP_APL_PMCR0, regs[rt] & ~PERCPU(exc_entry_pmcr0_cnt));
|
||||
msr(SYS_IMP_APL_PMCR0, regs[rt]);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue