aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-11-22 18:44:09 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2016-11-22 19:18:22 -0500
commit02ed21aeda0e02d84af493f92b1b6b6b13ddd6e8 (patch)
treea115a394a9d00b00766e3fa42afbc67c0bf932f0
parent1f0f2e72270c089c291aac794800cc326c4c05dd (diff)
powerpc/powernv: Define and set POWER9 HFSCR doorbell bit
Define and set the POWER9 HFSCR doorbell bit so that guests can use msgsndp. ISA 3.0 calls this MSGP, so name it accordingly in the code. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/reg.h2
-rw-r--r--arch/powerpc/kernel/cpu_setup_power.S2
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index c94df450bdd6..04aa1ee8cdb6 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -309,6 +309,7 @@
309 309
310/* HFSCR and FSCR bit numbers are the same */ 310/* HFSCR and FSCR bit numbers are the same */
311#define FSCR_LM_LG 11 /* Enable Load Monitor Registers */ 311#define FSCR_LM_LG 11 /* Enable Load Monitor Registers */
312#define FSCR_MSGP_LG 10 /* Enable MSGP */
312#define FSCR_TAR_LG 8 /* Enable Target Address Register */ 313#define FSCR_TAR_LG 8 /* Enable Target Address Register */
313#define FSCR_EBB_LG 7 /* Enable Event Based Branching */ 314#define FSCR_EBB_LG 7 /* Enable Event Based Branching */
314#define FSCR_TM_LG 5 /* Enable Transactional Memory */ 315#define FSCR_TM_LG 5 /* Enable Transactional Memory */
@@ -324,6 +325,7 @@
324#define FSCR_DSCR __MASK(FSCR_DSCR_LG) 325#define FSCR_DSCR __MASK(FSCR_DSCR_LG)
325#define SPRN_HFSCR 0xbe /* HV=1 Facility Status & Control Register */ 326#define SPRN_HFSCR 0xbe /* HV=1 Facility Status & Control Register */
326#define HFSCR_LM __MASK(FSCR_LM_LG) 327#define HFSCR_LM __MASK(FSCR_LM_LG)
328#define HFSCR_MSGP __MASK(FSCR_MSGP_LG)
327#define HFSCR_TAR __MASK(FSCR_TAR_LG) 329#define HFSCR_TAR __MASK(FSCR_TAR_LG)
328#define HFSCR_EBB __MASK(FSCR_EBB_LG) 330#define HFSCR_EBB __MASK(FSCR_EBB_LG)
329#define HFSCR_TM __MASK(FSCR_TM_LG) 331#define HFSCR_TM __MASK(FSCR_TM_LG)
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 52ff3f025437..bdfc1c67eb38 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -174,7 +174,7 @@ __init_FSCR:
174__init_HFSCR: 174__init_HFSCR:
175 mfspr r3,SPRN_HFSCR 175 mfspr r3,SPRN_HFSCR
176 ori r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_BHRB|HFSCR_PM|\ 176 ori r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_BHRB|HFSCR_PM|\
177 HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP|HFSCR_EBB 177 HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP|HFSCR_EBB|HFSCR_MSGP
178 mtspr SPRN_HFSCR,r3 178 mtspr SPRN_HFSCR,r3
179 blr 179 blr
180 180