Skip to contentSkip to conversation

Introduce phys_size_t and move phys_addr_t into asm/types.h

PATCH New Kumar Gala 2 participants 2 messages Mar 27, 2008 – Apr 14, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH v2 1/1 Introduce phys_size_t and move phys_addr_t into asm/types.h

Also add CONFIG_PHYS_64BIT on powerpc to deal with 32-bit ppc's that have larger physical addresses like 44x, 85xx, and 86xx.

---
 include/asm-arm/io.h           |    2 --
 include/asm-arm/types.h        |    3 +++
 include/asm-avr32/io.h         |    2 --
 include/asm-avr32/types.h      |    3 +++
 include/asm-blackfin/io.h      |    2 --
 include/asm-blackfin/types.h   |    3 +++
 include/asm-i386/io.h          |    2 --
 include/asm-i386/types.h       |    3 +++
 include/asm-m68k/io.h          |    2 --
 include/asm-m68k/types.h       |    3 +++
 include/asm-microblaze/io.h    |    2 --
 include/asm-microblaze/types.h |    3 +++
 include/asm-mips/io.h          |    2 --
 include/asm-mips/types.h       |    8 ++++++++
 include/asm-nios/io.h          |    2 --
 include/asm-nios/types.h       |    3 +++
 include/asm-nios2/io.h         |    2 --
 include/asm-ppc/io.h           |    2 --
 include/asm-ppc/types.h        |    8 ++++++++
 include/asm-sh/io.h            |    2 --
 include/asm-sh/types.h         |    3 +++
 21 files changed, 40 insertions(+), 22 deletions(-)
include/asm-arm/io.h +0 -2
index 029b7f9..c33b9e8 100644
@@ -38,8 +38,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-arm/types.h +3 -0
index e56f19d..71dc049 100644
@@ -45,6 +45,9 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #endif /* __KERNEL__ */
 
 #endif
include/asm-avr32/io.h +0 -2
index ba14674..d030c26 100644
@@ -101,8 +101,6 @@ static inline void sync(void)
  * This implementation works for memory below 512MiB (flash, etc.) as
  * well as above 3.5GiB (internal peripherals.)
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(1 << 7)
 #define MAP_WRBACK	(MAP_WRCOMBINE | (1 << 9))
include/asm-avr32/types.h +3 -0
index 2dbea4b..c303e3c 100644
@@ -71,6 +71,9 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #ifdef CONFIG_LBD
 typedef u64 sector_t;
 #define HAVE_SECTOR_T
include/asm-blackfin/io.h +0 -2
index 2149685..da58914 100644
@@ -45,8 +45,6 @@ extern void cf_outb(unsigned char val, volatile unsigned char *addr);
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-blackfin/types.h +3 -0
index 9fd8e03..2160ba0 100644
@@ -78,6 +78,9 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #endif
 
 #endif
include/asm-i386/io.h +0 -2
index db4f442..2c57140 100644
@@ -210,8 +210,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-i386/types.h +3 -0
index bdbde41..9a40e38 100644
@@ -45,6 +45,9 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #endif /* __KERNEL__ */
 
 #endif
include/asm-m68k/io.h +0 -2
index 33c454a..1fccc12 100644
@@ -232,8 +232,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-m68k/types.h +3 -0
index e944d3f..44b4ca5 100644
@@ -44,6 +44,9 @@ typedef unsigned long long u64;
 /* DMA addresses are 32-bits wide */
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #endif /* __KERNEL__ */
 #endif /* __ASSEMBLY__ */
 
include/asm-microblaze/io.h +0 -2
index 90d1842..aa37a60 100644
@@ -134,8 +134,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-microblaze/types.h +3 -0
index 3895dc4..77094f6 100644
@@ -52,6 +52,9 @@ typedef unsigned long long u64;
 /* Dma addresses are 32-bits wide.  */
 
 typedef u32 dma_addr_t;
+
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_TYPES_H */
include/asm-mips/io.h +0 -2
index e27d1f1..7137072 100644
@@ -470,8 +470,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-mips/types.h +8 -0
index f49a217..d4bb859 100644
@@ -78,8 +78,16 @@ typedef unsigned long long u64;
 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
     || defined(CONFIG_64BIT)
 typedef u64 dma_addr_t;
+
+typedef u64 phys_addr_t;
+typedef u64 phys_size_t;
+
 #else
 typedef u32 dma_addr_t;
+
+typedef u32 phys_addr_t;
+typedef u32 phys_size_t;
+
 #endif
 typedef u64 dma64_addr_t;
 
include/asm-nios/io.h +0 -2
index 6fc339f..12a0bd9 100644
@@ -114,8 +114,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-nios/types.h +3 -0
index 24c98a8..636e12f 100644
@@ -52,6 +52,9 @@ typedef unsigned long long u64;
 /* Dma addresses are 32-bits wide.  */
 
 typedef u32 dma_addr_t;
+
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
 #endif /* __KERNEL__ */
 
 #endif /* _NIOS_TYPES_H */
include/asm-nios2/io.h +0 -2
index a52b95c..2f1ec26 100644
@@ -34,8 +34,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-ppc/io.h +0 -2
index 91c9c1e..00b7ec5 100644
@@ -243,8 +243,6 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE	(0)
 #define MAP_WRCOMBINE	(0)
 #define MAP_WRBACK	(0)
include/asm-ppc/types.h +8 -0
index 7adf145..864391f 100644
@@ -44,6 +44,14 @@ typedef unsigned long long u64;
 /* DMA addresses are 32-bits wide */
 typedef u32 dma_addr_t;
 
+#ifdef CONFIG_PHYS_64BIT
+typedef unsigned long long phys_addr_t;
+typedef unsigned long long phys_size_t;
+#else
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* __ASSEMBLY__ */
 
include/asm-sh/io.h +0 -2
index 51fd10b..7400293 100644
@@ -233,8 +233,6 @@ static inline void sync(void)
  * that can be used to access the memory range with the caching
  * properties specified by "flags".
  */
-typedef unsigned long phys_addr_t;
-
 #define MAP_NOCACHE     (0)
 #define MAP_WRCOMBINE   (0)
 #define MAP_WRBACK      (0)
include/asm-sh/types.h +3 -0
index 7ba69d9..aed4a6e 100644
@@ -52,6 +52,9 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
+typedef unsigned long phys_addr_t;
+typedef unsigned long phys_size_t;
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Signature · 1 line
1.5.4.1
#1 lore raw

PATCH v2 1/1 Introduce phys_size_t and move phys_addr_t into asm/types.h

Quoted 19 lines · In message <[email protected]> you wrote:

Also add CONFIG_PHYS_64BIT on powerpc to deal with 32-bit ppc's that have larger physical addresses like 44x, 85xx, and 86xx.

---
 include/asm-arm/io.h           |    2 --
 include/asm-arm/types.h        |    3 +++
 include/asm-avr32/io.h         |    2 --
 include/asm-avr32/types.h      |    3 +++
 include/asm-blackfin/io.h      |    2 --
 include/asm-blackfin/types.h   |    3 +++
 include/asm-i386/io.h          |    2 --
 include/asm-i386/types.h       |    3 +++
 include/asm-m68k/io.h          |    2 --
 include/asm-m68k/types.h       |    3 +++
 include/asm-microblaze/io.h    |    2 --
 include/asm-microblaze/types.h |    3 +++
 include/asm-mips/io.h          |    2 --
 include/asm-mips/types.h       |    8 ++++++++
Quoted 8 lines
 include/asm-nios/io.h          |    2 --
 include/asm-nios/types.h       |    3 +++
 include/asm-nios2/io.h         |    2 --
 include/asm-ppc/io.h           |    2 --
 include/asm-ppc/types.h        |    8 ++++++++
 include/asm-sh/io.h            |    2 --
 include/asm-sh/types.h         |    3 +++
 21 files changed, 40 insertions(+), 22 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The POP3 server service depends on the SMTP  server  service,  which
failed to start because of the following error: The operation comple-
ted successfully."                         -- Windows NT Server v3.51