summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mtrr
diff options
context:
space:
mode:
authorYinghai Lu2008-03-19 00:44:19 +0100
committerIngo Molnar2008-03-21 17:06:15 +0100
commit5dca6a1bb014875a17289fdaae8c31e0a3641c99 (patch)
treec6cb1eab44e92cedbfcee707de6ed2ad960e20e6 /arch/x86/kernel/cpu/mtrr
parentx86: fix reboot problem with Dell Optiplex 745, 0KW626 board (diff)
downloadkernel-qcow2-linux-5dca6a1bb014875a17289fdaae8c31e0a3641c99.tar.gz
kernel-qcow2-linux-5dca6a1bb014875a17289fdaae8c31e0a3641c99.tar.xz
kernel-qcow2-linux-5dca6a1bb014875a17289fdaae8c31e0a3641c99.zip
x86: trim mtrr don't close gap for resource allocation.
fix the bug reported here: http://bugzilla.kernel.org/show_bug.cgi?id=10232 use update_memory_range() instead of add_memory_range() directly to avoid closing the gap. ( the new code only affects and runs on systems where the MTRR workaround triggers. ) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr')
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index be83336fddba..a6450b3ae759 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -711,7 +711,8 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
trim_size = end_pfn;
trim_size <<= PAGE_SHIFT;
trim_size -= trim_start;
- add_memory_region(trim_start, trim_size, E820_RESERVED);
+ update_memory_range(trim_start, trim_size, E820_RAM,
+ E820_RESERVED);
update_e820();
return 1;
}