Yinghai Lu 9f3a5f52aa x86: Make e820_remove_range to handle all covered case
Rusty found on lguest with trim_bios_range, max_pfn is not right anymore, and
looks e820_remove_range does not work right.

[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  LGUEST: 0000000000000000 - 0000000004000000 (usable)
[    0.000000] Notice: NX (Execute Disable) protection missing in CPU or disabled in BIOS!
[    0.000000] DMI not present or invalid.
[    0.000000] last_pfn = 0x3fa0 max_arch_pfn = 0x100000
[    0.000000] init_memory_mapping: 0000000000000000-0000000003fa0000

root cause is: the e820_remove_range doesn't handle the all covered
case.  e820_remove_range(BIOS_START, BIOS_END - BIOS_START, ...)
produces a bogus range as a result.

Make it match e820_update_range() by handling that case too.

Reported-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Tested-by: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <4BB18E55.6090903@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-03-31 17:40:57 -07:00
..
2009-07-19 18:27:51 +02:00
2009-10-29 22:34:14 +09:00
2010-02-07 17:47:51 +01:00
2010-01-05 09:17:33 +09:00
2010-02-09 11:13:56 +01:00
2009-09-24 09:34:52 +09:30
2010-02-24 11:01:33 -08:00
2009-11-17 07:53:21 +01:00
2009-07-14 16:25:05 +02:00
2009-09-15 15:08:40 -04:00
2009-12-09 16:28:59 -08:00
2009-07-19 18:27:51 +02:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:52:32 -08:00
2010-02-16 18:21:32 +01:00
2010-03-08 16:55:37 +01:00