X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=arch%2Farm64%2Fkernel%2Fhead.S;h=917d98108b3f05d9b1013020f9f576a3db776bc6;hb=fe26e52712ccab6648df17ecc029a68a69a01a85;hp=ffe9c2b6431bd5c0cb1e9982afe84e13a82e2043;hpb=9638685e32af961943b679fcb72d4ddd458eb18f;p=cascardo%2Flinux.git diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index ffe9c2b6431b..917d98108b3f 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -514,9 +514,14 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems #endif /* EL2 debug */ + mrs x0, id_aa64dfr0_el1 // Check ID_AA64DFR0_EL1 PMUVer + sbfx x0, x0, #8, #4 + cmp x0, #1 + b.lt 4f // Skip if no PMU present mrs x0, pmcr_el0 // Disable debug access traps ubfx x0, x0, #11, #5 // to EL2 and allow access to msr mdcr_el2, x0 // all PMU counters from EL1 +4: /* Stage-2 translation */ msr vttbr_el2, xzr