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>
This commit is contained in:
Yinghai Lu
2008-03-18 16:44:19 -07:00
committed by Ingo Molnar
szülő fc1c8925c8
commit 5dca6a1bb0
5 fájl változott, egészen pontosan 59 új sor hozzáadva és 1 régi sor törölve

Fájl megtekintése

@@ -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;
}