[Skiboot] [RFC PATCH v7 11/12] skiboot/imc: Disable IMC node when UV enabled

Ryan Grimm grimm at linux.ibm.com
Tue Jul 7 02:14:38 AEST 2020


From: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>

Don't create the IMC nodes when the ultravisor is enabled.  Hypervisor
IMC initialization requires access to HOMER and IMC scoms which are
protected and only accessable via ultra calls.  So, don't create them
until the kernel supports the ultra calls.

Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
[ grimm: move S bit check to beginning of function ]
[ grimm: comments and commit message ]
Signed-off-by: Ryan Grimm <grimm at linux.ibm.com>
---
 hw/imc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/imc.c b/hw/imc.c
index 927fba0b..f6351225 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -527,6 +527,16 @@ void imc_init(void)
 	struct dt_node *dev;
 	int err_flag = -1;
 
+	/*
+	 * If MSR(S) bit is set, HOMER and IMC scoms are only accessible via
+	 * ultra call.  The kernels lacks support, so don't create them.
+	 *
+	 * At this point uv_present can't be used since uv_init()
+	 * is called much later, so check the MSR bit.
+	 */
+	if (is_msr_bit_set(MSR_S))
+		return;
+
 	if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS) {
 		dev = dt_find_compatible_node(dt_root, NULL,
 					"ibm,opal-in-memory-counters");
-- 
2.21.0



More information about the Skiboot mailing list