* [patch] mm/hugetlb.c: fix build failure
@ 2008-07-25 10:57 Ingo Molnar
2008-07-25 18:35 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-07-25 10:57 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Linus Torvalds
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 <mingo@elte.hu>
---
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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] mm/hugetlb.c: fix build failure
2008-07-25 10:57 [patch] mm/hugetlb.c: fix build failure Ingo Molnar
@ 2008-07-25 18:35 ` Ingo Molnar
2008-07-25 20:31 ` Nish Aravamudan
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-07-25 18:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Linus Torvalds
* Ingo Molnar <mingo@elte.hu> 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 <mingo@elte.hu>
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 <mingo@elte.hu>
---
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] mm/hugetlb.c: fix build failure
2008-07-25 18:35 ` Ingo Molnar
@ 2008-07-25 20:31 ` Nish Aravamudan
0 siblings, 0 replies; 3+ messages in thread
From: Nish Aravamudan @ 2008-07-25 20:31 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Andrew Morton, linux-kernel, Linus Torvalds
On 7/25/08, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Ingo Molnar <mingo@elte.hu> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-25 20:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 10:57 [patch] mm/hugetlb.c: fix build failure Ingo Molnar
2008-07-25 18:35 ` Ingo Molnar
2008-07-25 20:31 ` Nish Aravamudan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox