Instead of just saying "Disabled" when MTRRs are disabled for any
reason, tell what is disabled and why.
Signed-off-by: Juergen Gross <[email protected]>
---
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
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 7882b69eb6cdf6288a89d831d95c8547400a8b4d
Gitweb: https://git.kernel.org/tip/7882b69eb6cdf6288a89d831d95c8547400a8b4d
Author: Juergen Gross <[email protected]>
AuthorDate: Mon, 05 Dec 2022 09:04:33 +01:00
Committer: Borislav Petkov (AMD) <[email protected]>
CommitterDate: Mon, 05 Dec 2022 11:08:25 +01:00
x86/mtrr: Make message for disabled MTRRs more descriptive
Instead of just saying "Disabled" when MTRRs are disabled for any
reason, tell what is disabled and why.
Signed-off-by: Juergen Gross <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
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 6432abc..783f321 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.c
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
@@ -629,6 +629,7 @@ int __initdata changed_by_mtrr_cleanup;
*/
void __init mtrr_bp_init(void)
{
+ const char *why = "(not available)";
u32 phys_addr;
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);
}
/**
On Mon, Dec 05, 2022 at 09:04:33AM +0100, Juergen Gross wrote:
> Instead of just saying "Disabled" when MTRRs are disabled for any
> reason, tell what is disabled and why.
>
> Signed-off-by: Juergen Gross <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
--
Kiryl Shutsemau / Kirill A. Shutemov