* build error in powerpc tree
@ 2008-07-14 7:03 Stephen Rothwell
2008-07-14 8:39 ` Benjamin Herrenschmidt
2008-07-14 9:25 ` [PATCH] powerpc: mman.h export fixups Stephen Rothwell
0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2008-07-14 7:03 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: ppc-dev, Dave Kleikamp
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
Hi Ben,
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
Also, that header file is now using CONFIG_PPC64 which we should not do
in the unprotected (by #ifdef __KERNEL__) part an exported header file,
we should use __powerpc64__ instead.
I suspect all the CONFIG_PPC64 part of the file could be surrounded by
#ifdef __KERNEL__ and the include of <linux/mm.h> could be moved to this
section. The file should then be changed to unifdef-y from header-y in
the Kbuild file. (Might have been easier to send a patch :-))
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: build error in powerpc tree
2008-07-14 7:03 build error in powerpc tree Stephen Rothwell
@ 2008-07-14 8:39 ` Benjamin Herrenschmidt
2008-07-14 9:25 ` [PATCH] powerpc: mman.h export fixups Stephen Rothwell
1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2008-07-14 8:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, Dave Kleikamp
On Mon, 2008-07-14 at 17:03 +1000, Stephen Rothwell wrote:
> Hi Ben,
>
> 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
>
> Also, that header file is now using CONFIG_PPC64 which we should not do
> in the unprotected (by #ifdef __KERNEL__) part an exported header file,
> we should use __powerpc64__ instead.
>
> I suspect all the CONFIG_PPC64 part of the file could be surrounded by
> #ifdef __KERNEL__ and the include of <linux/mm.h> could be moved to this
> section. The file should then be changed to unifdef-y from header-y in
> the Kbuild file. (Might have been easier to send a patch :-))
I'll dbl check tomorrow. PROT_SAO must be exported always but everything
else should pretty much be under __KERNEL__. Interesting that this
hasn't shown up in Paulus test build scripts that I used.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] powerpc: mman.h export fixups
2008-07-14 7:03 build error in powerpc tree Stephen Rothwell
2008-07-14 8:39 ` Benjamin Herrenschmidt
@ 2008-07-14 9:25 ` Stephen Rothwell
2008-07-14 14:02 ` Arnd Bergmann
2008-07-14 16:34 ` Dave Kleikamp
1 sibling, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2008-07-14 9:25 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: ppc-dev, linux-next, Dave Kleikamp
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.
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
include/asm-powerpc/Kbuild | 2 +-
include/asm-powerpc/mman.h | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
I have included this patch in today's linux-next tree.
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 34a0a8d..329ecfd 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
@@ -28,6 +27,7 @@ unifdef-y += byteorder.h
unifdef-y += cputable.h
unifdef-y += elf.h
unifdef-y += nvram.h
+unifdef-y += mman.h
unifdef-y += param.h
unifdef-y += posix_types.h
unifdef-y += ptrace.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 */
--
1.5.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: mman.h export fixups
2008-07-14 9:25 ` [PATCH] powerpc: mman.h export fixups Stephen Rothwell
@ 2008-07-14 14:02 ` Arnd Bergmann
2008-07-14 16:34 ` Dave Kleikamp
1 sibling, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2008-07-14 14:02 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Stephen Rothwell, linux-next, Dave Kleikamp
On Monday 14 July 2008, Stephen Rothwell wrote:
> index 34a0a8d..329ecfd 100644
> --- a/include/asm-powerpc/Kbuild
> +++ b/include/asm-powerpc/Kbuild
> @@ -2,7 +2,6 @@ include include/asm-generic/Kbuild.asm
> =A0
> =A0header-y +=3D auxvec.h
> =A0header-y +=3D ioctls.h
> -header-y +=3D mman.h
> =A0header-y +=3D sembuf.h
> =A0header-y +=3D siginfo.h
> =A0header-y +=3D stat.h
> @@ -28,6 +27,7 @@ unifdef-y +=3D byteorder.h
> =A0unifdef-y +=3D cputable.h
> =A0unifdef-y +=3D elf.h
> =A0unifdef-y +=3D nvram.h
> +unifdef-y +=3D mman.h
> =A0unifdef-y +=3D param.h
> =A0unifdef-y +=3D posix_types.h
> =A0unifdef-y +=3D ptrace.h
mman.h is already listed as unifdef-y in include/asm-generic/Kbuild.asm,
so you can probably just drop it here.
Arnd <><
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: mman.h export fixups
2008-07-14 9:25 ` [PATCH] powerpc: mman.h export fixups Stephen Rothwell
2008-07-14 14:02 ` Arnd Bergmann
@ 2008-07-14 16:34 ` Dave Kleikamp
1 sibling, 0 replies; 5+ messages in thread
From: Dave Kleikamp @ 2008-07-14 16:34 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, ppc-dev
On Mon, 2008-07-14 at 19:25 +1000, Stephen Rothwell wrote:
> 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.
Agreed. None of the code in the CONFIG_PPC64 ifdef needs to be seen by
user space.
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> ---
> include/asm-powerpc/Kbuild | 2 +-
> include/asm-powerpc/mman.h | 8 ++++++--
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> I have included this patch in today's linux-next tree.
>
> diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
> index 34a0a8d..329ecfd 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
> @@ -28,6 +27,7 @@ unifdef-y += byteorder.h
> unifdef-y += cputable.h
> unifdef-y += elf.h
> unifdef-y += nvram.h
> +unifdef-y += mman.h
> unifdef-y += param.h
> unifdef-y += posix_types.h
> unifdef-y += ptrace.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 */
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-14 16:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 7:03 build error in powerpc tree Stephen Rothwell
2008-07-14 8:39 ` Benjamin Herrenschmidt
2008-07-14 9:25 ` [PATCH] powerpc: mman.h export fixups Stephen Rothwell
2008-07-14 14:02 ` Arnd Bergmann
2008-07-14 16:34 ` Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).