[PATCH 1/4] powerpc/perf: Initialise PMU related regs on POWER9
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Sat Jun 11 17:18:12 AEST 2016
Add two new init functions __init_PMU_300 and __init_PMU_HV_300
to initialise PMU related regs on POWER9.
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
arch/powerpc/kernel/cpu_setup_power.S | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 584e119fa8b0..a2080fde0cc5 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -87,6 +87,7 @@ _GLOBAL(__restore_cpu_power8)
_GLOBAL(__setup_cpu_power9)
mflr r11
bl __init_FSCR
+ bl __init_PMU_300
bl __init_hvmode_206
mtlr r11
beqlr
@@ -97,12 +98,14 @@ _GLOBAL(__setup_cpu_power9)
bl __init_LPCR
bl __init_HFSCR
bl __init_tlb_power9
+ bl __init_PMU_HV_300
mtlr r11
blr
_GLOBAL(__restore_cpu_power9)
mflr r11
bl __init_FSCR
+ bl __init_PMU_300
mfmsr r3
rldicl. r0,r3,4,63
mtlr r11
@@ -114,6 +117,7 @@ _GLOBAL(__restore_cpu_power9)
bl __init_LPCR
bl __init_HFSCR
bl __init_tlb_power9
+ bl __init_PMU_HV_300
mtlr r11
blr
@@ -219,3 +223,16 @@ __init_PMU:
mtspr SPRN_MMCR1,r5
mtspr SPRN_MMCR2,r5
blr
+
+__init_PMU_HV_300:
+ li r5,0
+ mtspr SPRN_MMCRC,r5
+ blr
+
+__init_PMU_300:
+ li r5,0
+ mtspr SPRN_MMCRA,r5
+ mtspr SPRN_MMCR0,r5
+ mtspr SPRN_MMCR1,r5
+ mtspr SPRN_MMCR2,r5
+ blr
--
1.9.1
More information about the Linuxppc-dev
mailing list