From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@uclinux.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] m68k: avoid pgprot_noncached redefinition
Date: Thu, 27 Aug 2009 13:41:57 +0200 [thread overview]
Message-ID: <20090827114157.GA8678@osiris.boeblingen.de.ibm.com> (raw)
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__ */
/*
next reply other threads:[~2009-08-27 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 11:41 Heiko Carstens [this message]
2009-08-27 12:18 ` Geert Uytterhoeven
2009-08-27 12:38 ` Heiko Carstens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090827114157.GA8678@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=gerg@uclinux.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®