* [PATCH] x86: check range in reserve_early()
@ 2009-02-23 23:20 Yinghai Lu
2009-02-24 19:41 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-02-23 23:20 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
Cc: linux-kernel@vger.kernel.org
Impact: cleanup
one 32bit system report:
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000001c000000 (usable)
BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
DMI 2.0 present.
last_pfn = 0x1c000 max_arch_pfn = 0x100000
kernel direct mapping tables up to 1c000000 @ 7000-c000
...
RAMDISK: 1bc69000 - 1bfef4fa
...
0MB HIGHMEM available.
448MB LOWMEM available.
mapped low ram: 0 - 1c000000
low ram: 00000000 - 1c000000
bootmap 00002000 - 00005800
(9 early reservations) ==> bootmem [0000000000 - 001c000000]
#0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
#1 [0000001000 - 0000002000] EX TRAMPOLINE ==> [0000001000 - 0000002000]
#2 [0000006000 - 0000007000] TRAMPOLINE ==> [0000006000 - 0000007000]
#3 [0000400000 - 00009ed14c] TEXT DATA BSS ==> [0000400000 - 00009ed14c]
#4 [001bc69000 - 001bfef4fa] RAMDISK ==> [001bc69000 - 001bfef4fa]
#5 [00009ee000 - 00009f2000] INIT_PG_TABLE ==> [00009ee000 - 00009f2000]
#6 [000009f400 - 0000100000] BIOS reserved ==> [000009f400 - 0000100000]
#7 [0000007000 - 0000007000] PGTABLE
#8 [0000002000 - 0000006000] BOOTMAP ==> [0000002000 - 0000006000]
got strange blank entry with PGTABLE
the reason is init_pg_table is big enough, and zero range is called with
init_memory_mapping/reserve_early()
so try to check the range in reserve_early()
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/kernel/e820.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -858,6 +858,9 @@ void __init reserve_early_overlap_ok(u64
*/
void __init reserve_early(u64 start, u64 end, char *name)
{
+ if (start <= end)
+ return;
+
drop_overlaps_that_are_ok(start, end);
__reserve_early(start, end, name, 0);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: check range in reserve_early()
2009-02-23 23:20 [PATCH] x86: check range in reserve_early() Yinghai Lu
@ 2009-02-24 19:41 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-02-24 19:41 UTC (permalink / raw)
To: Yinghai Lu
Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel@vger.kernel.org
* Yinghai Lu <yinghai@kernel.org> wrote:
> Impact: cleanup
>
> one 32bit system report:
>
> BIOS-provided physical RAM map:
> BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
> BIOS-e820: 0000000000100000 - 000000001c000000 (usable)
> BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
> DMI 2.0 present.
> last_pfn = 0x1c000 max_arch_pfn = 0x100000
> kernel direct mapping tables up to 1c000000 @ 7000-c000
> ...
> RAMDISK: 1bc69000 - 1bfef4fa
> ...
> 0MB HIGHMEM available.
> 448MB LOWMEM available.
> mapped low ram: 0 - 1c000000
> low ram: 00000000 - 1c000000
> bootmap 00002000 - 00005800
> (9 early reservations) ==> bootmem [0000000000 - 001c000000]
> #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
> #1 [0000001000 - 0000002000] EX TRAMPOLINE ==> [0000001000 - 0000002000]
> #2 [0000006000 - 0000007000] TRAMPOLINE ==> [0000006000 - 0000007000]
> #3 [0000400000 - 00009ed14c] TEXT DATA BSS ==> [0000400000 - 00009ed14c]
> #4 [001bc69000 - 001bfef4fa] RAMDISK ==> [001bc69000 - 001bfef4fa]
> #5 [00009ee000 - 00009f2000] INIT_PG_TABLE ==> [00009ee000 - 00009f2000]
> #6 [000009f400 - 0000100000] BIOS reserved ==> [000009f400 - 0000100000]
> #7 [0000007000 - 0000007000] PGTABLE
> #8 [0000002000 - 0000006000] BOOTMAP ==> [0000002000 - 0000006000]
>
> got strange blank entry with PGTABLE
>
> the reason is init_pg_table is big enough, and zero range is called with
> init_memory_mapping/reserve_early()
>
> so try to check the range in reserve_early()
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> arch/x86/kernel/e820.c | 3 +++
> 1 file changed, 3 insertions(+)
Applied to tip/x86/mm, thanks Yinghai!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-24 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 23:20 [PATCH] x86: check range in reserve_early() Yinghai Lu
2009-02-24 19:41 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.