[PATCH 1/13] ia64: parse kernel parameter hugepagesz= in early boot
From: Mel Gorman
Date: Mon Sep 10 2007 - 07:20:47 EST
Subject: ia64: parse kernel parameter hugepagesz= in early boot
Parse hugepagesz with early_param() instead of __setup(). __setup()
is called after the memory allocator has been initialised and the
pageblock bitmaps already setup. In tests on one IA64 there did not
seem to be any problem with using early_param() and in fact may be
more correct as it guarantees the parameter is handled before the
parsing of hugepages=.
Signed-off-by: Mel Gorman <mel@xxxxxxxxx>
Acked-by: Andy Whitcroft <apw@xxxxxxxxxxxx>
Acked-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
arch/ia64/Kconfig | 5 +++++
arch/ia64/mm/hugetlbpage.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc5-clean/arch/ia64/Kconfig linux-2.6.23-rc5-001-ia64-parse-kernel-parameter-hugepagesz=-in-early-boot/arch/ia64/Kconfig
--- linux-2.6.23-rc5-clean/arch/ia64/Kconfig 2007-09-01 07:08:24.000000000 +0100
+++ linux-2.6.23-rc5-001-ia64-parse-kernel-parameter-hugepagesz=-in-early-boot/arch/ia64/Kconfig 2007-09-02 16:18:48.000000000 +0100
@@ -54,6 +54,11 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config HUGETLB_PAGE_SIZE_VARIABLE
+ bool
+ depends on HUGETLB_PAGE
+ default y
+
config GENERIC_FIND_NEXT_BIT
bool
default y
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc5-clean/arch/ia64/mm/hugetlbpage.c linux-2.6.23-rc5-001-ia64-parse-kernel-parameter-hugepagesz=-in-early-boot/arch/ia64/mm/hugetlbpage.c
--- linux-2.6.23-rc5-clean/arch/ia64/mm/hugetlbpage.c 2007-09-01 07:08:24.000000000 +0100
+++ linux-2.6.23-rc5-001-ia64-parse-kernel-parameter-hugepagesz=-in-early-boot/arch/ia64/mm/hugetlbpage.c 2007-09-02 16:18:48.000000000 +0100
@@ -194,6 +194,6 @@ static int __init hugetlb_setup_sz(char
* override here with new page shift.
*/
ia64_set_rr(HPAGE_REGION_BASE, hpage_shift << 2);
- return 1;
+ return 0;
}
-__setup("hugepagesz=", hugetlb_setup_sz);
+early_param("hugepagesz", hugetlb_setup_sz);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/