Skip to contentSkip to conversation

powerpc: enable ARCH_DMA_ADDR_T_64BIT with ARCH_PHYS_ADDR_T_64BIT

PATCH In review [email protected] 4 participants 5 messages Oct 1, 2010 – Oct 3, 2010 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: enable ARCH_DMA_ADDR_T_64BIT with ARCH_PHYS_ADDR_T_64BIT

From: FUJITA Tomonori <[email protected]>

---

 arch/powerpc/Kconfig |    3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit +3 -0
diff -puN arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit arch/powerpc/Kconfig
@@ -16,6 +16,9 @@ config WORD_SIZE
 config ARCH_PHYS_ADDR_T_64BIT
        def_bool PPC64 || PHYS_64BIT
 
+config ARCH_DMA_ADDR_T_64BIT
+	def_bool ARCH_PHYS_ADDR_T_64BIT
+
 config MMU
 	bool
 	default y

_

#1 lore raw
Quoted 11 lines · On Fri, Oct 1, 2010 at 5:12 PM, <[email protected]> wrote:

From: FUJITA Tomonori <[email protected]>

---

=A0arch/powerpc/Kconfig | =A0 =A03 +++
=A01 file changed, 3 insertions(+)

diff -puN arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-=

arch_phys_addr_t_64bit arch/powerpc/Kconfig

Quoted 1 line

--- a/arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch=

_phys_addr_t_64bit

arch/powerpc/Kconfig config WORD_SIZE · line 21

Quoted 8 lines

+++ a/arch/powerpc/Kconfig

(quoted diff) +0 -0
@@ -16,6 +16,9 @@ config WORD_SIZE

=A0config ARCH_PHYS_ADDR_T_64BIT
=A0 =A0 =A0 =A0def_bool PPC64 || PHYS_64BIT

arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit +3 -0
+config ARCH_DMA_ADDR_T_64BIT
+ =A0 =A0 =A0 def_bool ARCH_PHYS_ADDR_T_64BIT
+

I seemed to have missed what this is about entirely. Is there some place I can look that describes what that is supposed to do? The PPC 4xx boards set PHYS_ADDR_T_64BIT because the MMU uses 36 bit addressing, but the CPU is only 32 bits. I want to make sure this DMA thing isn't going to cause problems.

josh

#2 lore raw
Quoted 9 lines · Josh Boyer

arch/powerpc/Kconfig config WORD_SIZE · line 21

Quoted 3 lines
arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit +3 -0
+config ARCH_DMA_ADDR_T_64BIT
+       def_bool ARCH_PHYS_ADDR_T_64BIT
+

I seemed to have missed what this is about entirely. Is there some place I can look that describes what that is supposed to do? The PPC 4xx boards set PHYS_ADDR_T_64BIT because the MMU uses 36 bit addressing, but the CPU is only 32 bits. I want to make sure this DMA thing isn't going to cause problems.

Yes, we need to test a bit. Our dma_addr_t has remained 32-bit so far because despite the fact that we've had routinely to deal with >32-bit physical addresses for MMIO, physical memory support has been constrained afaik to 32-bit.

We might be better off keeping this as something individual platforms can select...

Cheers,
Ben.

#3 lore raw
Quoted 7 lines · On Sat, 02 Oct 2010 13:20:54 +1000 Benjamin Herrenschmidt…
Quoted 6 lines · Josh Boyer

arch/powerpc/Kconfig config WORD_SIZE · line 21

Quoted 3 lines
arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit +3 -0
+config ARCH_DMA_ADDR_T_64BIT
+       def_bool ARCH_PHYS_ADDR_T_64BIT
+

I seemed to have missed what this is about entirely. Is there some place I can look that describes what that is supposed to do? The PPC

This patchset unifies dma_addr_t typedef.

Quoted 3 lines
Quoted 3 lines

4xx boards set PHYS_ADDR_T_64BIT because the MMU uses 36 bit addressing, but the CPU is only 32 bits. I want to make sure this DMA thing isn't going to cause problems.

this patchset changes nothing. Please see below.

Quoted 4 lines

Yes, we need to test a bit. Our dma_addr_t has remained 32-bit so far because despite the fact that we've had routinely to deal with >32-bit physical addresses for MMIO, physical memory support has been constrained afaik to 32-bit.

Really?

The current dma_addr_t is:

#if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) typedef u64 dma_addr_t;
#else
typedef u32 dma_addr_t;
#endif
typedef u64 dma64_addr_t;

I think that this patch doesn't change anything. Or I miss something?

@@ -22,6 +22,9 @@ config WORD_SIZE
config ARCH_PHYS_ADDR_T_64BIT

        def_bool PPC64 || PHYS_64BIT

+config ARCH_DMA_ADDR_T_64BIT
+ def_bool ARCH_PHYS_ADDR_T_64BIT
+
config MMU
bool
default y

#4 lore raw
Quoted 11 lines

Really?

The current dma_addr_t is:

#if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) typedef u64 dma_addr_t;
#else
typedef u32 dma_addr_t;
#endif
typedef u64 dma64_addr_t;

-EBRAINFAI ... either I wasn't looking when we changed it or I just forgot :-) We -used-, I'm pretty sure, to have it always 32-bit :-)

Anyways, doesn't matter. Patch looks good. We can always tweak the config option if we want to later.

Cheers,
Ben.

Quoted 13 lines

I think that this patch doesn't change anything. Or I miss something?

arch/powerpc/Kconfig renamed from arch/powerpc/Kconfig~powerpc-enable-arch_dma_addr_t_64bit-with-arch_phys_addr_t_64bit +3 -0
@@ -22,6 +22,9 @@ config WORD_SIZE
 config ARCH_PHYS_ADDR_T_64BIT
        def_bool PPC64 || PHYS_64BIT
 
+config ARCH_DMA_ADDR_T_64BIT
+       def_bool ARCH_PHYS_ADDR_T_64BIT
+
 config MMU
        bool
        default y