[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807100417.00285.yhlu.kernel@gmail.com>
Date: Thu, 10 Jul 2008 04:17:00 -0700
From: Yinghai Lu <yhlu.kernel@...il.com>
To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Bernhard Walle <bwalle@...e.de>
Subject: [PATCH] x86: e820 remove the range instead of update it to reserved
also let mem= to print out modified e820 map too
Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
---
arch/x86/kernel/e820.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
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
@@ -1165,6 +1165,8 @@ static void early_panic(char *msg)
panic(msg);
}
+static int userdef __initdata;
+
/* "mem=nopentium" disables the 4MB page tables. */
static int __init parse_memopt(char *p)
{
@@ -1180,17 +1182,15 @@ static int __init parse_memopt(char *p)
}
#endif
+ userdef = 1;
mem_size = memparse(p, &p);
end_user_pfn = mem_size>>PAGE_SHIFT;
- e820_update_range(mem_size, ULLONG_MAX - mem_size,
- E820_RAM, E820_RESERVED);
+ e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
return 0;
}
early_param("mem", parse_memopt);
-static int userdef __initdata;
-
static int __init parse_memmap_opt(char *p)
{
char *oldp;
@@ -1230,8 +1230,7 @@ static int __init parse_memmap_opt(char
e820_add_region(start_at, mem_size, E820_RESERVED);
} else {
end_user_pfn = (mem_size >> PAGE_SHIFT);
- e820_update_range(mem_size, ULLONG_MAX - mem_size,
- E820_RAM, E820_RESERVED);
+ e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
}
return *p == '\0' ? 0 : -EINVAL;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists