aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/cpu/mtrr.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-11-09 23:00:06 -0500
committerTom Rini <trini@konsulko.com>2020-11-09 23:00:06 -0500
commitf36603c7a823308f23d10d443d6cbf6b365c12bd (patch)
treeffbb15770d82b9a6e61fe2a1f16a190f0aa5d311 /arch/x86/cpu/mtrr.c
parent1ae955e3a58f46918ef99b0b6c562967ba1bf39e (diff)
parentca010674edb289b1f623e83b4529b6d9ae5e5c0d (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Avoid using hardcoded number of variable range MTRRs in mtrr_commit() - coral: Correct max98357 file - coral: Update smbios tables to latest definition
Diffstat (limited to 'arch/x86/cpu/mtrr.c')
-rw-r--r--arch/x86/cpu/mtrr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 5180eb06fc..6f095c53a5 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -158,7 +158,7 @@ int mtrr_commit(bool do_caches)
/* Clear the ones that are unused */
debug("clear\n");
- for (; i < MTRR_MAX_COUNT; i++)
+ for (; i < mtrr_get_var_count(); i++)
wrmsrl(MTRR_PHYS_MASK_MSR(i), 0);
debug("close\n");
mtrr_close(&state, do_caches);