[PATCH 2/8] Guard htab_dt_scan_hugepage_blocks appropriately

Tony Breeds tony at bakeyournoodle.com
Thu Jul 31 13:51:42 EST 2008


htab_dt_scan_hugepage_blocks is only used when CONFIG_HUGETLB_PAGE is
defined, likewise guard the declaration.

Signed-off-by: Tony Breeds <tony at bakeyournoodle.com>
---
 arch/powerpc/mm/hash_utils_64.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 5ce5a4d..fa58777 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -329,6 +329,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,
 	return 0;
 }
 
+#ifdef CONFIG_HUGETLB_PAGE
 /* Scan for 16G memory blocks that have been set aside for huge pages
  * and reserve those blocks for 16G huge pages.
  */
@@ -366,6 +367,7 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
 	add_gpage(phys_addr, block_size, expected_pages);
 	return 0;
 }
+#endif /* CONFIG_HUGETLB_PAGE */
 
 static void __init htab_init_page_sizes(void)
 {
-- 
1.5.6.3




More information about the Linuxppc-dev mailing list