[POWERPC] Move phys_addr_t definition into asm/types.h
authorKumar Gala <galak@kernel.crashing.org>
Tue, 15 Apr 2008 19:52:27 +0000 (05:52 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 16 Apr 2008 21:46:14 +0000 (07:46 +1000)
Moved phys_addr_t out of mmu-*.h and into asm/types.h so we can use it in
places that before would have caused recursive includes.

For example to use phys_addr_t in <asm/page.h> we would have included
<asm/mmu.h> which would have possibly included <asm/mmu-hash64.h> which
includes <asm/page.h>.  Wheeee recursive include.

CONFIG_PHYS_64BIT is a bit counterintuitive in light of ppc64 systems
and thus the config option is only used for ppc32 systems with >32-bit
physical addresses (44x, 85xx, 745x, etc.).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/mmu-40x.h
include/asm-powerpc/mmu-44x.h
include/asm-powerpc/mmu-8xx.h
include/asm-powerpc/mmu-fsl-booke.h
include/asm-powerpc/mmu-hash32.h
include/asm-powerpc/mmu-hash64.h
include/asm-powerpc/types.h

index 7d37f77043ac70d7f4ce072d0e5047c3b5231714..3d108676584c8ef6cf0c4ac7e3cb813939a358a8 100644 (file)
@@ -53,8 +53,6 @@
 
 #ifndef __ASSEMBLY__
 
-typedef unsigned long phys_addr_t;
-
 typedef struct {
        unsigned long id;
        unsigned long vdso_base;
index 62772ae839ca73728ca86df9085482c3594a53ec..c8b02d97f75378c6c42b81c3adadfed7a57ffbd8 100644 (file)
@@ -53,8 +53,6 @@
 
 #ifndef __ASSEMBLY__
 
-typedef unsigned long long phys_addr_t;
-
 typedef struct {
        unsigned long id;
        unsigned long vdso_base;
index 952bd8899f2fedec9ac21df3a8e60bfb1816d8b1..9db877eb88db4f28d1eefce0321add39ce85ca82 100644 (file)
 #define SPRN_M_TW      799
 
 #ifndef __ASSEMBLY__
-typedef unsigned long phys_addr_t;
-
 typedef struct {
        unsigned long id;
        unsigned long vdso_base;
index 37580004cd7a3095400705c4e4c683c9c3744707..925d93cf64d8596f5b376a6b7740cc7193b25a95 100644 (file)
 
 #ifndef __ASSEMBLY__
 
-#ifndef CONFIG_PHYS_64BIT
-typedef unsigned long phys_addr_t;
-#else
-typedef unsigned long long phys_addr_t;
-#endif
-
 typedef struct {
        unsigned long id;
        unsigned long vdso_base;
index 4bd735be3833be841711e5baea3f21c799b7eabf..6e21ca618ec352874e472a2f59b6da40cea22ae4 100644 (file)
@@ -84,8 +84,6 @@ typedef struct {
        unsigned long vdso_base;
 } mm_context_t;
 
-typedef unsigned long phys_addr_t;
-
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_MMU_HASH32_H_ */
index 2864fa3989ea4d40efd456b1b18b4daec5f48af3..0dff76776044dde1c5ced93d86079f875fb0a062 100644 (file)
@@ -469,9 +469,6 @@ static inline unsigned long get_vsid(unsigned long context, unsigned long ea,
                                 VSID_MODULUS_256M)
 #define KERNEL_VSID(ea)                VSID_SCRAMBLE(GET_ESID(ea))
 
-/* Physical address used by some IO functions */
-typedef unsigned long phys_addr_t;
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_MMU_HASH64_H_ */
index 903fd1932436a0f696f51f509777382b6a24707d..c243a6ac60e528506b9c4fc48bea7f6146d818b5 100644 (file)
@@ -84,6 +84,13 @@ typedef unsigned long long u64;
 
 typedef __vector128 vector128;
 
+/* Physical address used by some IO functions */
+#if defined(CONFIG_PPC64) || defined(CONFIG_PHYS_64BIT)
+typedef u64 phys_addr_t;
+#else
+typedef u32 phys_addr_t;
+#endif
+
 #ifdef __powerpc64__
 typedef u64 dma_addr_t;
 #else