powerpc: mman.h export fixups

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, July 15, 2008 - 8:18 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3fcaa...
Commit:     b3fcaaa8a6359e9ed623ed4c1d2d48c79eed4648
Parent:     5b0504c0d795d6b0a904ff861c043d7a231f67a4
Author:     Stephen Rothwell <sfr@canb.auug.org.au>
AuthorDate: Mon Jul 14 19:25:57 2008 +1000
Committer:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
CommitDate: Tue Jul 15 12:24:53 2008 +1000

    powerpc: mman.h export fixups
    
    Commit ef3d3246a0d06be622867d21af25f997aeeb105f ("powerpc/mm: Add Strong
    Access Ordering support") in the powerpc/{next,master} tree caused the
    following in a powerpc allmodconfig build:
    
    usr/include/asm/mman.h requires linux/mm.h, which does not exist in exported headers
    
    We should not use CONFIG_PPC64 in an unprotected (by __KERNEL__)
    section of an exported include file and linux/mm.h is not exported.  So
    protect the whole section that is CONFIG_PPC64 with __KERNEL__ and put
    the two introduced includes in there as well.
    
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 include/asm-powerpc/Kbuild |    1 -
 include/asm-powerpc/mman.h |    8 ++++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 34a0a8d..04ce8f8 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -2,7 +2,6 @@ include include/asm-generic/Kbuild.asm
 
 header-y += auxvec.h
 header-y += ioctls.h
-header-y += mman.h
 header-y += sembuf.h
 header-y += siginfo.h
 header-y += stat.h
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h
index f8a32e2..9209f75 100644
--- a/include/asm-powerpc/mman.h
+++ b/include/asm-powerpc/mman.h
@@ -1,9 +1,7 @@
 #ifndef _ASM_POWERPC_MMAN_H
 #define _ASM_POWERPC_MMAN_H
 
-#include <asm/cputable.h>
 #include <asm-generic/mman.h>
-#include <linux/mm.h>
 
 /*
  * This program is free software; you can redistribute it and/or
@@ -28,7 +26,12 @@
 #define MAP_POPULATE	0x8000		/* populate (prefault) pagetables */
 #define MAP_NONBLOCK	0x10000		/* do not block on IO */
 
+#ifdef __KERNEL__
 #ifdef CONFIG_PPC64
+
+#include <asm/cputable.h>
+#include <linux/mm.h>
+
 /*
  * This file is included by linux/mman.h, so we can't use cacl_vm_prot_bits()
  * here.  How important is the optimization?
@@ -56,4 +59,5 @@ static inline int arch_validate_prot(unsigned long prot)
 #define arch_validate_prot(prot) arch_validate_prot(prot)
 
 #endif /* CONFIG_PPC64 */
+#endif /* __KERNEL__ */
 #endif	/* _ASM_POWERPC_MMAN_H */
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
powerpc: mman.h export fixups, Linux Kernel Mailing ..., (Tue Jul 15, 8:18 pm)