diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-10-04 17:50:32 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-04 23:09:14 -0400 |
commit | 99e1aa17ce434010dd820b583628370cc15f10f3 (patch) | |
tree | f856dd2dd02d6986f590eb47b2fe3cf814807b57 /arch/x86/kernel/cpu/mtrr/main.c | |
parent | 42fde7a05c5d6dc76e518ae12091ea897b1c132b (diff) |
x86: mtrr_cleanup: first 1M may be covered in var mtrrs
The first 1M is don't care when it comes to the variables MTRRs.
Cover it as WB as a heuristic approximation; this is generally what we
want to minimize the number of registers.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/main.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 9086b38fbabe..663e530e08e0 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -1293,6 +1293,15 @@ static int __init mtrr_cleanup(unsigned address_bits) | |||
1293 | } | 1293 | } |
1294 | nr_range = x86_get_mtrr_mem_range(range, 0, extra_remove_base, | 1294 | nr_range = x86_get_mtrr_mem_range(range, 0, extra_remove_base, |
1295 | extra_remove_size); | 1295 | extra_remove_size); |
1296 | /* | ||
1297 | * [0, 1M) should always be coverred by var mtrr with WB | ||
1298 | * and fixed mtrrs should take effective before var mtrr for it | ||
1299 | */ | ||
1300 | nr_range = add_range_with_merge(range, nr_range, 0, | ||
1301 | (1ULL<<(20 - PAGE_SHIFT)) - 1); | ||
1302 | /* sort the ranges */ | ||
1303 | sort(range, nr_range, sizeof(struct res_range), cmp_range, NULL); | ||
1304 | |||
1296 | range_sums = sum_ranges(range, nr_range); | 1305 | range_sums = sum_ranges(range, nr_range); |
1297 | printk(KERN_INFO "total RAM coverred: %ldM\n", | 1306 | printk(KERN_INFO "total RAM coverred: %ldM\n", |
1298 | range_sums >> (20 - PAGE_SHIFT)); | 1307 | range_sums >> (20 - PAGE_SHIFT)); |