[PATCH 2/2] x86/mtrr: make message for disabled MTRRs more descriptive
From: Juergen Gross
Date: Mon Dec 05 2022 - 03:05:41 EST
Instead of just saying "Disabled" when MTRRs are disabled for any
reason, tell what is disabled and why.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
arch/x86/kernel/cpu/mtrr/mtrr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c
index 6432abccbf56..94d5739758ba 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.c
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
@@ -630,6 +630,7 @@ int __initdata changed_by_mtrr_cleanup;
void __init mtrr_bp_init(void)
{
u32 phys_addr;
+ const char *why = "(not available)";
phys_addr = 32;
@@ -705,12 +706,13 @@ void __init mtrr_bp_init(void)
changed_by_mtrr_cleanup = mtrr_cleanup(phys_addr);
} else {
mtrr_if = NULL;
+ why = "by BIOS";
}
}
}
if (!mtrr_enabled())
- pr_info("Disabled\n");
+ pr_info("MTRRs disabled %s\n", why);
}
/**
--
2.35.3