Skip to contentSkip to conversation

arm64: ioremap: add ioremap_cache macro

RFC Applied yalin wang 4 participants 8 messages Oct 12, 2015 – Oct 14, 2015 arm64

lore
Share & tools
lore

yalin wang

author
#0 lore raw

RFC 1/1 arm64: ioremap: add ioremap_cache macro

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
 arch/arm64/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/include/asm/io.h +1 -0
index 44be1e0..d6b620c 100644
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)		__ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)		__ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap				__iounmap
+#define ioremap_cache                  ioremap_cache
 
 /*
  * io{read,write}{16,32}be() macros
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 14 lines · yalin wang

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
 arch/arm64/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/include/asm/io.h +0 -0
index 44be1e0..d6b620c 100644

arch/arm64/include/asm/io.h extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); · line 175

Quoted 4 lines
arch/arm64/include/asm/io.h +1 -0
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)		__ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)		__ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap				__iounmap
+#define ioremap_cache                  ioremap_cache

Applied. Thanks.

Signature · 1 line
Catalin
#2 lore raw
Quoted 10 lines · Catalin Marinas
Quoted 9 lines · yalin wang

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
 arch/arm64/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

arch/arm64/include/asm/io.h extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); · line 175

Quoted 9 lines
arch/arm64/include/asm/io.h +1 -0
index 44be1e0..d6b620c 100644
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)		__ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)		__ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap				__iounmap
+#define ioremap_cache                  ioremap_cache

Applied. Thanks.

I'm not sure we want this. See:

https://lkml.org/lkml/2015/10/9/699

Will

maintainer
#3 lore raw
Quoted 23 lines · Will Deacon
Quoted 10 lines · Catalin Marinas
Quoted 9 lines · yalin wang

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
 arch/arm64/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

arch/arm64/include/asm/io.h extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); · line 175

Quoted 9 lines
arch/arm64/include/asm/io.h +1 -0
index 44be1e0..d6b620c 100644
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)		__ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)		__ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap				__iounmap
+#define ioremap_cache                  ioremap_cache

Applied. Thanks.

Quoted 3 lines

I'm not sure we want this. See:

https://lkml.org/lkml/2015/10/9/699

Thanks Will and Arnd, I missed this. Patch reverted.

Signature · 1 line
Catalin
author
#4 lore raw
Quoted 27 lines · Catalin Marinas
Quoted 23 lines · Will Deacon
Quoted 21 lines · Catalin Marinas
Quoted 14 lines · yalin wang

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
arch/arm64/include/asm/io.h | 1 +

1 file changed, 1 insertion(+)
arch/arm64/include/asm/io.h +0 -0
index 44be1e0..d6b620c 100644

arch/arm64/include/asm/io.h extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); · line 175

Quoted 4 lines
arch/arm64/include/asm/io.h +1 -0
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)		__ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)		__ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap				__iounmap
+#define ioremap_cache                  ioremap_cache

Applied. Thanks.

Quoted 6 lines
Quoted 3 lines

I'm not sure we want this. See:

https://lkml.org/lkml/2015/10/9/699

Thanks Will and Arnd, I missed this. Patch reverted.

i don?t understand why conflict with Dan Williams? patch.
Dan Williams ?s patch also define ioremap_cache for arch ia64 & arch sh & arch xtensa , i see this :

# git show   92281dee825f
am i miss something?

Thanks

#5 lore raw
Quoted 5 lines · On Wednesday 14 October 2015 10:41:26 yalin wang wrote:
Quoted 5 lines · Catalin Marinas
Quoted 3 lines

I'm not sure we want this. See:

https://lkml.org/lkml/2015/10/9/699

Quoted 7 lines
Quoted 2 lines

Thanks Will and Arnd, I missed this. Patch reverted.

i don?t understand why conflict with Dan Williams? patch.
Dan Williams ?s patch also define ioremap_cache for arch ia64 & arch sh & arch xtensa , i see this :

# git show   92281dee825f
am i miss something?

I meant the new series, see https://lkml.org/lkml/2015/10/9/716 for the patch that removes it again.

Arnd

author
#6 lore raw
Quoted 18 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 14 October 2015 10:41:26 yalin wang wrote:
Quoted 5 lines · Catalin Marinas
Quoted 3 lines

I'm not sure we want this. See:

https://lkml.org/lkml/2015/10/9/699

Quoted 7 lines
Quoted 2 lines

Thanks Will and Arnd, I missed this. Patch reverted.

i don?t understand why conflict with Dan Williams? patch.
Dan Williams ?s patch also define ioremap_cache for arch ia64 & arch sh & arch xtensa , i see this :

# git show   92281dee825f
am i miss something?
Quoted 4 lines

I meant the new series, see https://lkml.org/lkml/2015/10/9/716 for the patch that removes it again.

Arnd

Got it ,
Thanks :)

#7 lore raw
In reply to Catalin Marinas
Quoted 10 lines · On Tuesday 13 October 2015 15:10:55 Catalin Marinas wrote:
Quoted 9 lines · yalin wang

Add ioremap_cache macro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example, memremap.c do like this.

---
 arch/arm64/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

arch/arm64/include/asm/io.h extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); · line 175

Quoted 9 lines
arch/arm64/include/asm/io.h +1 -0
index 44be1e0..d6b620c 100644
@@ -172,6 +172,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 #define ioremap_wc(addr, size)               __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
 #define ioremap_wt(addr, size)               __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define iounmap                              __iounmap
+#define ioremap_cache                  ioremap_cache

Applied. Thanks.

I think this will conflict with Dan Williams' series that removes ioremap_cache from the kernel and replaces it with memremap.c

Arnd