diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-03-16 19:33:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-17 05:47:47 -0400 |
commit | f0348c438c9ea156194d31fadde4a9e75522196f (patch) | |
tree | e06511311bbe5ca161526f9ab494765efe628413 /arch/x86/kernel/cpu/mtrr/main.c | |
parent | d4c90e37a21154c1910b2646e9544bdd32d5bc3a (diff) |
x86: MTRR workaround for system with stange var MTRRs
Impact: don't trim e820 according to wrong mtrr
Ozan reports that his server emits strange warning.
it turns out the BIOS sets the MTRRs incorrectly.
Ignore those strange ranges, and don't trim e820,
just emit one warning about BIOS
Reported-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49BEE1E7.7020706@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/main.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 5c2e266f41d7..03cda01f57c7 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -574,7 +574,7 @@ struct mtrr_value { | |||
574 | unsigned long lsize; | 574 | unsigned long lsize; |
575 | }; | 575 | }; |
576 | 576 | ||
577 | static struct mtrr_value mtrr_state[MTRR_MAX_VAR_RANGES]; | 577 | static struct mtrr_value mtrr_value[MTRR_MAX_VAR_RANGES]; |
578 | 578 | ||
579 | static int mtrr_save(struct sys_device * sysdev, pm_message_t state) | 579 | static int mtrr_save(struct sys_device * sysdev, pm_message_t state) |
580 | { | 580 | { |
@@ -582,9 +582,9 @@ static int mtrr_save(struct sys_device * sysdev, pm_message_t state) | |||
582 | 582 | ||
583 | for (i = 0; i < num_var_ranges; i++) { | 583 | for (i = 0; i < num_var_ranges; i++) { |
584 | mtrr_if->get(i, | 584 | mtrr_if->get(i, |
585 | &mtrr_state[i].lbase, | 585 | &mtrr_value[i].lbase, |
586 | &mtrr_state[i].lsize, | 586 | &mtrr_value[i].lsize, |
587 | &mtrr_state[i].ltype); | 587 | &mtrr_value[i].ltype); |
588 | } | 588 | } |
589 | return 0; | 589 | return 0; |
590 | } | 590 | } |
@@ -594,11 +594,11 @@ static int mtrr_restore(struct sys_device * sysdev) | |||
594 | int i; | 594 | int i; |
595 | 595 | ||
596 | for (i = 0; i < num_var_ranges; i++) { | 596 | for (i = 0; i < num_var_ranges; i++) { |
597 | if (mtrr_state[i].lsize) | 597 | if (mtrr_value[i].lsize) |
598 | set_mtrr(i, | 598 | set_mtrr(i, |
599 | mtrr_state[i].lbase, | 599 | mtrr_value[i].lbase, |
600 | mtrr_state[i].lsize, | 600 | mtrr_value[i].lsize, |
601 | mtrr_state[i].ltype); | 601 | mtrr_value[i].ltype); |
602 | } | 602 | } |
603 | return 0; | 603 | return 0; |
604 | } | 604 | } |