mm/hugetlb.c: fix build failure
Subsystems (4)
PATCH 1/1 mm/hugetlb.c: fix build failure
on !CONFIG_SYSCTL on x86 with latest -git i get:
mm/hugetlb.c: In function 'decrement_hugepage_resv_vma':
mm/hugetlb.c:83: error: 'reserve' undeclared (first use in this function) mm/hugetlb.c:83: error: (Each undeclared identifier is reported only once mm/hugetlb.c:83: error: for each function it appears in.)
--- mm/hugetlb.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
mm/hugetlb.c +11 -11
@@ -1026,6 +1026,17 @@ static void __init report_hugepages(void) } } +static unsigned int cpuset_mems_nr (unsigned int *array) +{ +int node; +unsigned int nr =0 ; + +for_each_node_mask (node, cpuset_current_mems_allowed) + nr += array[node]; + +return nr; +} +#ifdef CONFIG_SYSCTL #ifdef CONFIG_HIGHMEM static void try_to_free_low (struct hstate *h,unsigned long count)
@@ -1375,17 +1386,6 @@ static int __init hugetlb_default_setup(char *s) }__setup ("default_hugepagesz=" , hugetlb_default_setup); -static unsigned int cpuset_mems_nr (unsigned int *array) -{ -int node; -unsigned int nr =0 ; - -for_each_node_mask (node, cpuset_current_mems_allowed) - nr += array[node]; - -return nr; -} -int hugetlb_sysctl_handler (struct ctl_table *table,int write,struct file *file,void __user *buffer,size_t *length,loff_t *ppos)
Quoted 6 lines · Ingo Molnar
on !CONFIG_SYSCTL on x86 with latest -git i get:
mm/hugetlb.c: In function 'decrement_hugepage_resv_vma':
mm/hugetlb.c:83: error: 'reserve' undeclared (first use in this function)mm/hugetlb.c:83: error: (Each undeclared identifier is reported only oncemm/hugetlb.c:83: error: for each function it appears in.)
the above build error came from a bisection run, the fix i sent was for this build error:
mm/hugetlb.c: In function ‘hugetlb_acct_memory': mm/hugetlb.c:1507:
error: implicit declaration of function ‘cpuset_mems_nr'
but i also get a second hugetlb build failure on 64-bit x86:
arch/x86/mm/built-in.o: In function `setup_hugepagesz':
hugetlbpage.c:(.init.text+0xb49): undefined reference to `hugetlb_add_hstate'
fixed by the patch below.
Ingo
---------------->
Quoted 1 line
From
3a13a39219ac145913e51dfddc7c4d912586c15fMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Fri, 25 Jul 2008 20:45:52 +0200
Subject: [PATCH] hugetlbfs: fix build failure on 64-bit x86
fix:
arch/x86/mm/built-in.o: In function `setup_hugepagesz':
hugetlbpage.c:(.init.text+0xb49): undefined reference to `hugetlb_add_hstate'
--- arch/x86/mm/hugetlbpage.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/hugetlbpage.c +1 -1
@@ -425,7 +425,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ -#ifdef CONFIG_X86_64 +#if defined(CONFIG_X86_64 ) && defined(CONFIG_SYSCTL )static __init int setup_hugepagesz (char *opt) {unsigned long ps =memparse (opt, &opt);
Quoted 17 lines · Ingo Molnar
Quoted 6 lines · Ingo Molnar
on !CONFIG_SYSCTL on x86 with latest -git i get:
mm/hugetlb.c: In function 'decrement_hugepage_resv_vma':
mm/hugetlb.c:83: error: 'reserve' undeclared (first use in this function)mm/hugetlb.c:83: error: (Each undeclared identifier is reported only oncemm/hugetlb.c:83: error: for each function it appears in.)the above build error came from a bisection run, the fix i sent was for
this build error:
mm/hugetlb.c: In function 'hugetlb_acct_memory':mm/hugetlb.c:1507:
error: implicit declaration of function 'cpuset_mems_nr'
Quoted 6 lines
but i also get a second hugetlb build failure on 64-bit x86:
arch/x86/mm/built-in.o: In function `setup_hugepagesz':
hugetlbpage.c:(.init.text+0xb49): undefined reference to `hugetlb_add_hstate'fixed by the patch below.
Both issues (I expect) will be fixed by:
http://marc.info/?l=linux-kernel&m=121700986003238&w=2. Could you test?
Thanks,
Nish