All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 12:08 ` Yoichi Yuasa
  0 siblings, 0 replies; 18+ messages in thread
From: Yoichi Yuasa @ 2011-01-24 12:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: yuasa, linux-mips, linux-mm, linux-kernel

In file included from
linux-2.6/arch/mips/include/asm/tlb.h:21,
                 from mm/pgtable-generic.c:9:
include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function
'release_pages'
include/asm-generic/tlb.h: In function 'tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function
'page_cache_release'
make[1]: *** [mm/pgtable-generic.o] Error 1

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
 include/linux/swap.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 4d55932..92c1be6 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -8,6 +8,7 @@
 #include <linux/memcontrol.h>
 #include <linux/sched.h>
 #include <linux/node.h>
+#include <linux/pagemap.h>
 
 #include <asm/atomic.h>
 #include <asm/page.h>
-- 
1.7.3.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 12:08 ` Yoichi Yuasa
  0 siblings, 0 replies; 18+ messages in thread
From: Yoichi Yuasa @ 2011-01-24 12:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: yuasa, linux-mips, linux-mm, linux-kernel

In file included from
linux-2.6/arch/mips/include/asm/tlb.h:21,
                 from mm/pgtable-generic.c:9:
include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function
'release_pages'
include/asm-generic/tlb.h: In function 'tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function
'page_cache_release'
make[1]: *** [mm/pgtable-generic.o] Error 1

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
 include/linux/swap.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 4d55932..92c1be6 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -8,6 +8,7 @@
 #include <linux/memcontrol.h>
 #include <linux/sched.h>
 #include <linux/node.h>
+#include <linux/pagemap.h>
 
 #include <asm/atomic.h>
 #include <asm/page.h>
-- 
1.7.3.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-24 12:08 ` Yoichi Yuasa
@ 2011-01-24 13:15   ` Ralf Baechle
  -1 siblings, 0 replies; 18+ messages in thread
From: Ralf Baechle @ 2011-01-24 13:15 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Andrew Morton, linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 09:08:13PM +0900, Yoichi Yuasa wrote:

> In file included from
> linux-2.6/arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function
> 'release_pages'
> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function
> 'page_cache_release'
> make[1]: *** [mm/pgtable-generic.o] Error 1
> 
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>

Works as advertised for me.

Tested-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 13:15   ` Ralf Baechle
  0 siblings, 0 replies; 18+ messages in thread
From: Ralf Baechle @ 2011-01-24 13:15 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Andrew Morton, linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 09:08:13PM +0900, Yoichi Yuasa wrote:

> In file included from
> linux-2.6/arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function
> 'release_pages'
> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function
> 'page_cache_release'
> make[1]: *** [mm/pgtable-generic.o] Error 1
> 
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>

Works as advertised for me.

Tested-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-24 12:08 ` Yoichi Yuasa
@ 2011-01-24 19:30   ` Sergei Shtylyov
  -1 siblings, 0 replies; 18+ messages in thread
From: Sergei Shtylyov @ 2011-01-24 19:30 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Andrew Morton, linux-mips, linux-mm, linux-kernel

Hello.

Yoichi Yuasa wrote:

> In file included from
> linux-2.6/arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function
> 'release_pages'
> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function
> 'page_cache_release'
> make[1]: *** [mm/pgtable-generic.o] Error 1
> 
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
[...]

> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 4d55932..92c1be6 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -8,6 +8,7 @@
>  #include <linux/memcontrol.h>
>  #include <linux/sched.h>
>  #include <linux/node.h>
> +#include <linux/pagemap.h>

    Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
<linux/swap.h>?

WBR. Sergei

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 19:30   ` Sergei Shtylyov
  0 siblings, 0 replies; 18+ messages in thread
From: Sergei Shtylyov @ 2011-01-24 19:30 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Andrew Morton, linux-mips, linux-mm, linux-kernel

Hello.

Yoichi Yuasa wrote:

> In file included from
> linux-2.6/arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function
> 'release_pages'
> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function
> 'page_cache_release'
> make[1]: *** [mm/pgtable-generic.o] Error 1
> 
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
[...]

> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 4d55932..92c1be6 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -8,6 +8,7 @@
>  #include <linux/memcontrol.h>
>  #include <linux/sched.h>
>  #include <linux/node.h>
> +#include <linux/pagemap.h>

    Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
<linux/swap.h>?

WBR. Sergei

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-24 19:30   ` Sergei Shtylyov
@ 2011-01-24 20:44     ` Andrew Morton
  -1 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2011-01-24 20:44 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Yoichi Yuasa, linux-mips, linux-mm, linux-kernel

On Mon, 24 Jan 2011 22:30:46 +0300
Sergei Shtylyov <sshtylyov@mvista.com> wrote:

> Hello.
> 
> Yoichi Yuasa wrote:
> 
> > In file included from
> > linux-2.6/arch/mips/include/asm/tlb.h:21,
> >                  from mm/pgtable-generic.c:9:
> > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > include/asm-generic/tlb.h:76: error: implicit declaration of function
> > 'release_pages'
> > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > include/asm-generic/tlb.h:105: error: implicit declaration of function
> > 'page_cache_release'
> > make[1]: *** [mm/pgtable-generic.o] Error 1
> > 
> > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
> [...]
> 
> > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > index 4d55932..92c1be6 100644
> > --- a/include/linux/swap.h
> > +++ b/include/linux/swap.h
> > @@ -8,6 +8,7 @@
> >  #include <linux/memcontrol.h>
> >  #include <linux/sched.h>
> >  #include <linux/node.h>
> > +#include <linux/pagemap.h>
> 
>     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
> <linux/swap.h>?
> 

The build error is caused by macros which are defined in swap.h.

I worry about the effects of the patch - I don't know which of swap.h
and pagemap.h is the "innermost" header file.  There's potential for
new build errors due to strange inclusion graphs.

err, there's also this, in swap.h:

/* only sparc can not include linux/pagemap.h in this file
 * so leave page_cache_release and release_pages undeclared... */

It would be safer to convert free_page_and_swap_cache() and
free_pages_and_swap_cache() into out-of-line C functions.  Or to
explicitly include pagemap.h into the offending .c files.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 20:44     ` Andrew Morton
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2011-01-24 20:44 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Yoichi Yuasa, linux-mips, linux-mm, linux-kernel

On Mon, 24 Jan 2011 22:30:46 +0300
Sergei Shtylyov <sshtylyov@mvista.com> wrote:

> Hello.
> 
> Yoichi Yuasa wrote:
> 
> > In file included from
> > linux-2.6/arch/mips/include/asm/tlb.h:21,
> >                  from mm/pgtable-generic.c:9:
> > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > include/asm-generic/tlb.h:76: error: implicit declaration of function
> > 'release_pages'
> > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > include/asm-generic/tlb.h:105: error: implicit declaration of function
> > 'page_cache_release'
> > make[1]: *** [mm/pgtable-generic.o] Error 1
> > 
> > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
> [...]
> 
> > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > index 4d55932..92c1be6 100644
> > --- a/include/linux/swap.h
> > +++ b/include/linux/swap.h
> > @@ -8,6 +8,7 @@
> >  #include <linux/memcontrol.h>
> >  #include <linux/sched.h>
> >  #include <linux/node.h>
> > +#include <linux/pagemap.h>
> 
>     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
> <linux/swap.h>?
> 

The build error is caused by macros which are defined in swap.h.

I worry about the effects of the patch - I don't know which of swap.h
and pagemap.h is the "innermost" header file.  There's potential for
new build errors due to strange inclusion graphs.

err, there's also this, in swap.h:

/* only sparc can not include linux/pagemap.h in this file
 * so leave page_cache_release and release_pages undeclared... */

It would be safer to convert free_page_and_swap_cache() and
free_pages_and_swap_cache() into out-of-line C functions.  Or to
explicitly include pagemap.h into the offending .c files.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-24 20:44     ` Andrew Morton
@ 2011-01-24 21:07       ` Sam Ravnborg
  -1 siblings, 0 replies; 18+ messages in thread
From: Sam Ravnborg @ 2011-01-24 21:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sergei Shtylyov, Yoichi Yuasa, linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 12:44:12PM -0800, Andrew Morton wrote:
> On Mon, 24 Jan 2011 22:30:46 +0300
> Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> 
> > Hello.
> > 
> > Yoichi Yuasa wrote:
> > 
> > > In file included from
> > > linux-2.6/arch/mips/include/asm/tlb.h:21,
> > >                  from mm/pgtable-generic.c:9:
> > > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > > include/asm-generic/tlb.h:76: error: implicit declaration of function
> > > 'release_pages'
> > > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > > include/asm-generic/tlb.h:105: error: implicit declaration of function
> > > 'page_cache_release'
> > > make[1]: *** [mm/pgtable-generic.o] Error 1
> > > 
> > > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
> > [...]
> > 
> > > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > > index 4d55932..92c1be6 100644
> > > --- a/include/linux/swap.h
> > > +++ b/include/linux/swap.h
> > > @@ -8,6 +8,7 @@
> > >  #include <linux/memcontrol.h>
> > >  #include <linux/sched.h>
> > >  #include <linux/node.h>
> > > +#include <linux/pagemap.h>
> > 
> >     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
> > <linux/swap.h>?
> > 
> 
> The build error is caused by macros which are defined in swap.h.
> 
> I worry about the effects of the patch - I don't know which of swap.h
> and pagemap.h is the "innermost" header file.  There's potential for
> new build errors due to strange inclusion graphs.
> 
> err, there's also this, in swap.h:
> 
> /* only sparc can not include linux/pagemap.h in this file
>  * so leave page_cache_release and release_pages undeclared... */

I just checked.
sparc32 with a defconfig barfed out like this:
  CC      arch/sparc/kernel/traps_32.o
In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
                 from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
/home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
/home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'

When I removed the include it could build again.

	Sam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-24 21:07       ` Sam Ravnborg
  0 siblings, 0 replies; 18+ messages in thread
From: Sam Ravnborg @ 2011-01-24 21:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sergei Shtylyov, Yoichi Yuasa, linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 12:44:12PM -0800, Andrew Morton wrote:
> On Mon, 24 Jan 2011 22:30:46 +0300
> Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> 
> > Hello.
> > 
> > Yoichi Yuasa wrote:
> > 
> > > In file included from
> > > linux-2.6/arch/mips/include/asm/tlb.h:21,
> > >                  from mm/pgtable-generic.c:9:
> > > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > > include/asm-generic/tlb.h:76: error: implicit declaration of function
> > > 'release_pages'
> > > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > > include/asm-generic/tlb.h:105: error: implicit declaration of function
> > > 'page_cache_release'
> > > make[1]: *** [mm/pgtable-generic.o] Error 1
> > > 
> > > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
> > [...]
> > 
> > > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > > index 4d55932..92c1be6 100644
> > > --- a/include/linux/swap.h
> > > +++ b/include/linux/swap.h
> > > @@ -8,6 +8,7 @@
> > >  #include <linux/memcontrol.h>
> > >  #include <linux/sched.h>
> > >  #include <linux/node.h>
> > > +#include <linux/pagemap.h>
> > 
> >     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
> > <linux/swap.h>?
> > 
> 
> The build error is caused by macros which are defined in swap.h.
> 
> I worry about the effects of the patch - I don't know which of swap.h
> and pagemap.h is the "innermost" header file.  There's potential for
> new build errors due to strange inclusion graphs.
> 
> err, there's also this, in swap.h:
> 
> /* only sparc can not include linux/pagemap.h in this file
>  * so leave page_cache_release and release_pages undeclared... */

I just checked.
sparc32 with a defconfig barfed out like this:
  CC      arch/sparc/kernel/traps_32.o
In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
                 from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
                 from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
/home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
/home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
/home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'

When I removed the include it could build again.

	Sam

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-24 21:07       ` Sam Ravnborg
@ 2011-01-25  6:24         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2011-01-25  6:24 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Andrew Morton, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 22:07, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Mon, Jan 24, 2011 at 12:44:12PM -0800, Andrew Morton wrote:
>> On Mon, 24 Jan 2011 22:30:46 +0300
>> Sergei Shtylyov <sshtylyov@mvista.com> wrote:
>> > Yoichi Yuasa wrote:
>> >
>> > > In file included from
>> > > linux-2.6/arch/mips/include/asm/tlb.h:21,
>> > >                  from mm/pgtable-generic.c:9:
>> > > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
>> > > include/asm-generic/tlb.h:76: error: implicit declaration of function
>> > > 'release_pages'
>> > > include/asm-generic/tlb.h: In function 'tlb_remove_page':
>> > > include/asm-generic/tlb.h:105: error: implicit declaration of function
>> > > 'page_cache_release'
>> > > make[1]: *** [mm/pgtable-generic.o] Error 1
>> > >
>> > > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
>> > [...]
>> >
>> > > diff --git a/include/linux/swap.h b/include/linux/swap.h
>> > > index 4d55932..92c1be6 100644
>> > > --- a/include/linux/swap.h
>> > > +++ b/include/linux/swap.h
>> > > @@ -8,6 +8,7 @@
>> > >  #include <linux/memcontrol.h>
>> > >  #include <linux/sched.h>
>> > >  #include <linux/node.h>
>> > > +#include <linux/pagemap.h>
>> >
>> >     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in
>> > <linux/swap.h>?
>> >
>>
>> The build error is caused by macros which are defined in swap.h.
>>
>> I worry about the effects of the patch - I don't know which of swap.h
>> and pagemap.h is the "innermost" header file.  There's potential for
>> new build errors due to strange inclusion graphs.
>>
>> err, there's also this, in swap.h:
>>
>> /* only sparc can not include linux/pagemap.h in this file
>>  * so leave page_cache_release and release_pages undeclared... */

Yeah, I noticed this too a while ago, when trying to get m68k
allnoconfig "working".
Was wondering whether this was still true...

> I just checked.
> sparc32 with a defconfig barfed out like this:
>  CC      arch/sparc/kernel/traps_32.o
> In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
>                 from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'
>
> When I removed the include it could build again.

... and so it is. Good to know, thanks for checking!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-25  6:24         ` Geert Uytterhoeven
  0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2011-01-25  6:24 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Andrew Morton, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 22:07, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Mon, Jan 24, 2011 at 12:44:12PM -0800, Andrew Morton wrote:
>> On Mon, 24 Jan 2011 22:30:46 +0300
>> Sergei Shtylyov <sshtylyov@mvista.com> wrote:
>> > Yoichi Yuasa wrote:
>> >
>> > > In file included from
>> > > linux-2.6/arch/mips/include/asm/tlb.h:21,
>> > >                  from mm/pgtable-generic.c:9:
>> > > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
>> > > include/asm-generic/tlb.h:76: error: implicit declaration of function
>> > > 'release_pages'
>> > > include/asm-generic/tlb.h: In function 'tlb_remove_page':
>> > > include/asm-generic/tlb.h:105: error: implicit declaration of function
>> > > 'page_cache_release'
>> > > make[1]: *** [mm/pgtable-generic.o] Error 1
>> > >
>> > > Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
>> > [...]
>> >
>> > > diff --git a/include/linux/swap.h b/include/linux/swap.h
>> > > index 4d55932..92c1be6 100644
>> > > --- a/include/linux/swap.h
>> > > +++ b/include/linux/swap.h
>> > > @@ -8,6 +8,7 @@
>> > >  #include <linux/memcontrol.h>
>> > >  #include <linux/sched.h>
>> > >  #include <linux/node.h>
>> > > +#include <linux/pagemap.h>
>> >
>> >     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in
>> > <linux/swap.h>?
>> >
>>
>> The build error is caused by macros which are defined in swap.h.
>>
>> I worry about the effects of the patch - I don't know which of swap.h
>> and pagemap.h is the "innermost" header file.  There's potential for
>> new build errors due to strange inclusion graphs.
>>
>> err, there's also this, in swap.h:
>>
>> /* only sparc can not include linux/pagemap.h in this file
>>  * so leave page_cache_release and release_pages undeclared... */

Yeah, I noticed this too a while ago, when trying to get m68k
allnoconfig "working".
Was wondering whether this was still true...

> I just checked.
> sparc32 with a defconfig barfed out like this:
>  CC      arch/sparc/kernel/traps_32.o
> In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
>                 from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
>                 from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
> /home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'
>
> When I removed the include it could build again.

... and so it is. Good to know, thanks for checking!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-25  6:24         ` Geert Uytterhoeven
@ 2011-01-25  6:33           ` Andrew Morton
  -1 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2011-01-25  6:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Sam Ravnborg, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

On Tue, 25 Jan 2011 07:24:09 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > I just checked.
> > sparc32 with a defconfig barfed out like this:
> > __CC __ __ __arch/sparc/kernel/traps_32.o
> > In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'
> >
> > When I removed the include it could build again.
> 
> ... and so it is. Good to know, thanks for checking!

meanwhile I suppose someone should fix the error ;)


From: Andrew Morton <akpm@linux-foundation.org>

mips:

In file included from arch/mips/include/asm/tlb.h:21,
                 from mm/pgtable-generic.c:9:
include/asm-generic/tlb.h: In function `tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function `release_pages'
include/asm-generic/tlb.h: In function `tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function `page_cache_release'

free_pages_and_swap_cache() and free_page_and_swap_cache() are macros
which call release_pages() and page_cache_release().  The obvious fix is
to include pagemap.h in swap.h, where those macros are defined.  But that
breaks sparc for weird reasons.

So fix it within mm/pgtable-generic.c instead.

Reported-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/pgtable-generic.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN mm/pgtable-generic.c~mm-pgtable-genericc-fix-config_swap=n-build mm/pgtable-generic.c
--- a/mm/pgtable-generic.c~mm-pgtable-genericc-fix-config_swap=n-build
+++ a/mm/pgtable-generic.c
@@ -6,6 +6,7 @@
  *  Copyright (C) 2010  Linus Torvalds
  */
 
+#include <linux/pagemap.h>
 #include <asm/tlb.h>
 #include <asm-generic/pgtable.h>
 
_


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-25  6:33           ` Andrew Morton
  0 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2011-01-25  6:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Sam Ravnborg, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

On Tue, 25 Jan 2011 07:24:09 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > I just checked.
> > sparc32 with a defconfig barfed out like this:
> > __CC __ __ __arch/sparc/kernel/traps_32.o
> > In file included from /home/sam/kernel/linux-2.6.git/include/linux/pagemap.h:7:0,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/include/linux/swap.h:11,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable_32.h:15,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/include/asm/pgtable.h:6,
> > __ __ __ __ __ __ __ __ from /home/sam/kernel/linux-2.6.git/arch/sparc/kernel/traps_32.c:23:
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'is_vmalloc_addr':
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: error: 'VMALLOC_START' undeclared (first use in this function)
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:17: note: each undeclared identifier is reported only once for each function it appears in
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:301:41: error: 'VMALLOC_END' undeclared (first use in this function)
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h: In function 'maybe_mkwrite':
> > /home/sam/kernel/linux-2.6.git/include/linux/mm.h:483:3: error: implicit declaration of function 'pte_mkwrite'
> >
> > When I removed the include it could build again.
> 
> ... and so it is. Good to know, thanks for checking!

meanwhile I suppose someone should fix the error ;)


From: Andrew Morton <akpm@linux-foundation.org>

mips:

In file included from arch/mips/include/asm/tlb.h:21,
                 from mm/pgtable-generic.c:9:
include/asm-generic/tlb.h: In function `tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function `release_pages'
include/asm-generic/tlb.h: In function `tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function `page_cache_release'

free_pages_and_swap_cache() and free_page_and_swap_cache() are macros
which call release_pages() and page_cache_release().  The obvious fix is
to include pagemap.h in swap.h, where those macros are defined.  But that
breaks sparc for weird reasons.

So fix it within mm/pgtable-generic.c instead.

Reported-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/pgtable-generic.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN mm/pgtable-generic.c~mm-pgtable-genericc-fix-config_swap=n-build mm/pgtable-generic.c
--- a/mm/pgtable-generic.c~mm-pgtable-genericc-fix-config_swap=n-build
+++ a/mm/pgtable-generic.c
@@ -6,6 +6,7 @@
  *  Copyright (C) 2010  Linus Torvalds
  */
 
+#include <linux/pagemap.h>
 #include <asm/tlb.h>
 #include <asm-generic/pgtable.h>
 
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-25  6:33           ` Andrew Morton
@ 2011-01-25  7:41             ` Sam Ravnborg
  -1 siblings, 0 replies; 18+ messages in thread
From: Sam Ravnborg @ 2011-01-25  7:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

> From: Andrew Morton <akpm@linux-foundation.org>
> 
> mips:
> 
> In file included from arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function `tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function `release_pages'
> include/asm-generic/tlb.h: In function `tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function `page_cache_release'
> 
> free_pages_and_swap_cache() and free_page_and_swap_cache() are macros
> which call release_pages() and page_cache_release().  The obvious fix is
> to include pagemap.h in swap.h, where those macros are defined.  But that
> breaks sparc for weird reasons.
> 
> So fix it within mm/pgtable-generic.c instead.
> 
> Reported-by: Yoichi Yuasa <yuasa@linux-mips.org>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Sergei Shtylyov <sshtylyov@mvista.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

I have succesfully build sparc32 allnoconfig + defconfig with this patch.
Can you expand the changelog to specify that this fixes sparc32 allnoconfig
as well?

Consider it:
Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-25  7:41             ` Sam Ravnborg
  0 siblings, 0 replies; 18+ messages in thread
From: Sam Ravnborg @ 2011-01-25  7:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Sergei Shtylyov, Yoichi Yuasa, linux-mips,
	linux-mm, linux-kernel

> From: Andrew Morton <akpm@linux-foundation.org>
> 
> mips:
> 
> In file included from arch/mips/include/asm/tlb.h:21,
>                  from mm/pgtable-generic.c:9:
> include/asm-generic/tlb.h: In function `tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function `release_pages'
> include/asm-generic/tlb.h: In function `tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function `page_cache_release'
> 
> free_pages_and_swap_cache() and free_page_and_swap_cache() are macros
> which call release_pages() and page_cache_release().  The obvious fix is
> to include pagemap.h in swap.h, where those macros are defined.  But that
> breaks sparc for weird reasons.
> 
> So fix it within mm/pgtable-generic.c instead.
> 
> Reported-by: Yoichi Yuasa <yuasa@linux-mips.org>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Sergei Shtylyov <sshtylyov@mvista.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

I have succesfully build sparc32 allnoconfig + defconfig with this patch.
Can you expand the changelog to specify that this fixes sparc32 allnoconfig
as well?

Consider it:
Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
  2011-01-25  6:33           ` Andrew Morton
@ 2011-01-25 12:41             ` Ralf Baechle
  -1 siblings, 0 replies; 18+ messages in thread
From: Ralf Baechle @ 2011-01-25 12:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Sam Ravnborg, Sergei Shtylyov, Yoichi Yuasa,
	linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 10:33:47PM -0800, Andrew Morton wrote:

Works for me.

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] fix build error when CONFIG_SWAP is not set
@ 2011-01-25 12:41             ` Ralf Baechle
  0 siblings, 0 replies; 18+ messages in thread
From: Ralf Baechle @ 2011-01-25 12:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Sam Ravnborg, Sergei Shtylyov, Yoichi Yuasa,
	linux-mips, linux-mm, linux-kernel

On Mon, Jan 24, 2011 at 10:33:47PM -0800, Andrew Morton wrote:

Works for me.

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-01-25 12:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 12:08 [PATCH] fix build error when CONFIG_SWAP is not set Yoichi Yuasa
2011-01-24 12:08 ` Yoichi Yuasa
2011-01-24 13:15 ` Ralf Baechle
2011-01-24 13:15   ` Ralf Baechle
2011-01-24 19:30 ` Sergei Shtylyov
2011-01-24 19:30   ` Sergei Shtylyov
2011-01-24 20:44   ` Andrew Morton
2011-01-24 20:44     ` Andrew Morton
2011-01-24 21:07     ` Sam Ravnborg
2011-01-24 21:07       ` Sam Ravnborg
2011-01-25  6:24       ` Geert Uytterhoeven
2011-01-25  6:24         ` Geert Uytterhoeven
2011-01-25  6:33         ` Andrew Morton
2011-01-25  6:33           ` Andrew Morton
2011-01-25  7:41           ` Sam Ravnborg
2011-01-25  7:41             ` Sam Ravnborg
2011-01-25 12:41           ` Ralf Baechle
2011-01-25 12:41             ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.