|
@@ -442,6 +442,14 @@ void __init hvc_vio_init_early(void)
|
|
|
#ifdef CONFIG_PPC_EARLY_DEBUG_LPAR
|
|
|
void __init udbg_init_debug_lpar(void)
|
|
|
{
|
|
|
+ /*
|
|
|
+ * If we're running as a hypervisor then we definitely can't call the
|
|
|
+ * hypervisor to print debug output (we *are* the hypervisor), so don't
|
|
|
+ * register if we detect that MSR_HV=1.
|
|
|
+ */
|
|
|
+ if (mfmsr() & MSR_HV)
|
|
|
+ return;
|
|
|
+
|
|
|
hvterm_privs[0] = &hvterm_priv0;
|
|
|
hvterm_priv0.termno = 0;
|
|
|
hvterm_priv0.proto = HV_PROTOCOL_RAW;
|
|
@@ -455,6 +463,10 @@ void __init udbg_init_debug_lpar(void)
|
|
|
#ifdef CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI
|
|
|
void __init udbg_init_debug_lpar_hvsi(void)
|
|
|
{
|
|
|
+ /* See comment above in udbg_init_debug_lpar() */
|
|
|
+ if (mfmsr() & MSR_HV)
|
|
|
+ return;
|
|
|
+
|
|
|
hvterm_privs[0] = &hvterm_priv0;
|
|
|
hvterm_priv0.termno = CONFIG_PPC_EARLY_DEBUG_HVSI_VTERMNO;
|
|
|
hvterm_priv0.proto = HV_PROTOCOL_HVSI;
|