arm64: ioremap: add ioremap_cache macro
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
@@ -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
Quoted 14 lines · yalin wang
Add
ioremap_cachemacro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example,memremap.cdo like this.Signed-off-by yalin wang <[email protected]>--- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+)arch/arm64/include/asm/io.h +0
-0
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
Quoted 10 lines · Catalin Marinas
Quoted 9 lines · yalin wang
Add
ioremap_cachemacro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example,memremap.cdo like this.Signed-off-by yalin wang <[email protected]>--- 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@@ -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_cacheApplied. Thanks.
I'm not sure we want this. See:
https://lkml.org/lkml/2015/10/9/699
Will
Quoted 10 lines · On Tuesday 13 October 2015 15:10:55 Catalin Marinas wrote:
Quoted 9 lines · yalin wang
Add
ioremap_cachemacro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example,memremap.cdo like this.Signed-off-by yalin wang <[email protected]>--- 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@@ -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_cacheApplied. Thanks.
I think this will conflict with Dan Williams' series that removes ioremap_cache from the kernel and replaces it with memremap.c
Arnd
Catalin Marinas
maintainerQuoted 23 lines · Will Deacon
Quoted 10 lines · Catalin Marinas
Quoted 9 lines · yalin wang
Add
ioremap_cachemacro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example,memremap.cdo like this.Signed-off-by yalin wang <[email protected]>--- 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@@ -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_cacheApplied. Thanks.
Quoted 3 lines
I'm not sure we want this. See:
Thanks Will and Arnd, I missed this. Patch reverted.
Signature · 1 line
Catalin
Quoted 27 lines · Catalin Marinas
Quoted 23 lines · Will Deacon
Quoted 21 lines · Catalin Marinas
Quoted 14 lines · yalin wang
Add
ioremap_cachemacro, because some code will test if this macro is defined or not, and will generate a generric version if not defined, for example,memremap.cdo like this.Signed-off-by yalin wang <[email protected]>---
arch/arm64/include/asm/io.h| 1 +1 file changed, 1 insertion(+)arch/arm64/include/asm/io.h +0
-0arch/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_cacheApplied. Thanks.
Quoted 6 lines
Quoted 3 lines
I'm not sure we want this. See:
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
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:
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 defineioremap_cachefor 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
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:
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 defineioremap_cachefor 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 :)