mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] m68k: avoid pgprot_noncached redefinition
@ 2009-08-27 11:41 Heiko Carstens
  2009-08-27 12:18 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2009-08-27 11:41 UTC (permalink / raw)
  To: Geert Uytterhoeven, Greg Ungerer, Andrew Morton; +Cc: linux-kernel

From: Heiko Carstens <heiko.carstens@de.ibm.com>

While compiling m68k with defconfig I get tons if these warnings:

/home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
In file included from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:138,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable.h:4,
 from include/linux/mm.h:38,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/atarihw.h:134,
 from arch/m68k/atari/debug.c:20:
include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition

Reason for this is that asm-generic/pgtable.h gets included in pgtable_mm.h
before pgprot_noncached gets defined.
So the check "#ifndef pgprot_noncached" in the generic header file is too early.
Solve this by including the generic header file after the arch define.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/m68k/include/asm/pgtable_mm.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/m68k/include/asm/pgtable_mm.h
===================================================================
--- linux-2.6.orig/arch/m68k/include/asm/pgtable_mm.h
+++ linux-2.6/arch/m68k/include/asm/pgtable_mm.h
@@ -135,7 +135,6 @@ static inline void update_mmu_cache(stru
 #endif
 
 #ifndef __ASSEMBLY__
-#include <asm-generic/pgtable.h>
 
 /*
  * Macro to mark a page protection value as "uncacheable".
@@ -154,6 +153,8 @@ static inline void update_mmu_cache(stru
 	    ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))	\
 	    : (prot)))
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 /*

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

* Re: [PATCH] m68k: avoid pgprot_noncached redefinition
  2009-08-27 11:41 [PATCH] m68k: avoid pgprot_noncached redefinition Heiko Carstens
@ 2009-08-27 12:18 ` Geert Uytterhoeven
  2009-08-27 12:38   ` Heiko Carstens
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2009-08-27 12:18 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Greg Ungerer, Andrew Morton, linux-kernel

On Thu, Aug 27, 2009 at 13:41, Heiko Carstens<heiko.carstens@de.ibm.com> wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> While compiling m68k with defconfig I get tons if these warnings:
>
> /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
> In file included from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:138,
>  from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable.h:4,
>  from include/linux/mm.h:38,
>  from /home2/heicarst/linux-2.6/arch/m68k/include/asm/atarihw.h:134,
>  from arch/m68k/atari/debug.c:20:
> include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition
>
> Reason for this is that asm-generic/pgtable.h gets included in pgtable_mm.h
> before pgprot_noncached gets defined.
> So the check "#ifndef pgprot_noncached" in the generic header file is too early.
> Solve this by including the generic header file after the arch define.

Thanks, but Linus has just pulled the fix last night.

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] 3+ messages in thread

* Re: [PATCH] m68k: avoid pgprot_noncached redefinition
  2009-08-27 12:18 ` Geert Uytterhoeven
@ 2009-08-27 12:38   ` Heiko Carstens
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2009-08-27 12:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Greg Ungerer, Andrew Morton, linux-kernel

On Thu, Aug 27, 2009 at 02:18:05PM +0200, Geert Uytterhoeven wrote:
> On Thu, Aug 27, 2009 at 13:41, Heiko Carstens<heiko.carstens@de.ibm.com> wrote:
> > From: Heiko Carstens <heiko.carstens@de.ibm.com>
> >
> > While compiling m68k with defconfig I get tons if these warnings:
> >
> > /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
> > In file included from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:138,
> >  from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable.h:4,
> >  from include/linux/mm.h:38,
> >  from /home2/heicarst/linux-2.6/arch/m68k/include/asm/atarihw.h:134,
> >  from arch/m68k/atari/debug.c:20:
> > include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition
> >
> > Reason for this is that asm-generic/pgtable.h gets included in pgtable_mm.h
> > before pgprot_noncached gets defined.
> > So the check "#ifndef pgprot_noncached" in the generic header file is too early.
> > Solve this by including the generic header file after the arch define.
> 
> Thanks, but Linus has just pulled the fix last night.

Ah, good! Just stumbled across these when trying to cross compile the
spinlock inline patches on m68k.
To get spinlock inline patches running on m68k some more patches are
needed. I'm going to post them when I've (build) tested more architectures.

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

end of thread, other threads:[~2009-08-27 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-27 11:41 [PATCH] m68k: avoid pgprot_noncached redefinition Heiko Carstens
2009-08-27 12:18 ` Geert Uytterhoeven
2009-08-27 12:38   ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®