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.)
Signed-off-by: Ingo Molnar <[email protected]>
---
mm/hugetlb.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 41341c4..a8bf4ab 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -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)
* Ingo Molnar <[email protected]> wrote:
> 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.)
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
---------------->
>From 3a13a39219ac145913e51dfddc7c4d912586c15f Mon 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'
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/mm/hugetlbpage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index 8f307d9..977d185 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -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);
On 7/25/08, Ingo Molnar <[email protected]> wrote:
>
> * Ingo Molnar <[email protected]> wrote:
>
> > 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.)
>
>
> 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.
Both issues (I expect) will be fixed by:
http://marc.info/?l=linux-kernel&m=121700986003238&w=2. Could you
test?
Thanks,
Nish