From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, mikey@ozlabs.au.ibm.com,
Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Subject: [PATCH 1/4] powerpc/perf: Initialise PMU related regs on POWER9
Date: Sat, 11 Jun 2016 12:48:12 +0530 [thread overview]
Message-ID: <1465629495-17166-1-git-send-email-maddy@linux.vnet.ibm.com> (raw)
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@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
next reply other threads:[~2016-06-11 7:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 7:18 Madhavan Srinivasan [this message]
2016-06-11 7:18 ` [PATCH 2/4] powerpc/perf: Add power9 event list macros for generic and cache events Madhavan Srinivasan
2016-06-11 7:18 ` [PATCH 3/4] powerpc/perf: Power9 PMU support Madhavan Srinivasan
2016-06-17 13:13 ` [3/4] " Michael Ellerman
2016-06-11 7:18 ` [PATCH 4/4] powerpc/perf: Export Power9 generic and cache events to sysfs Madhavan Srinivasan
2016-06-17 13:18 ` [1/4] powerpc/perf: Initialise PMU related regs on POWER9 Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465629495-17166-1-git-send-email-maddy@linux.vnet.ibm.com \
--to=maddy@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@ozlabs.au.ibm.com \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).