From d092a87073269677b7ff09e71a8d91912b7f969a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 16 Oct 2019 08:09:38 +0200 Subject: arch: rely on asm-generic/io.h for default ioremap_* definitions Various architectures that use asm-generic/io.h still defined their own default versions of ioremap_nocache, ioremap_wt and ioremap_wc that point back to plain ioremap directly or indirectly. Remove these definitions and rely on asm-generic/io.h instead. For this to work the backup ioremap_* defintions needs to be changed to purely cpp macros instea of inlines to cover for architectures like openrisc that only define ioremap after including . Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Reviewed-by: Palmer Dabbelt --- arch/csky/include/asm/io.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/csky/include/asm/io.h') diff --git a/arch/csky/include/asm/io.h b/arch/csky/include/asm/io.h index 80d071e2567f..a4b9fb616faa 100644 --- a/arch/csky/include/asm/io.h +++ b/arch/csky/include/asm/io.h @@ -42,7 +42,6 @@ extern void iounmap(void *addr); #define ioremap(addr, size) __ioremap((addr), (size), pgprot_noncached(PAGE_KERNEL)) #define ioremap_wc(addr, size) __ioremap((addr), (size), pgprot_writecombine(PAGE_KERNEL)) -#define ioremap_nocache(addr, size) ioremap((addr), (size)) #define ioremap_cache ioremap_cache #include -- cgit From 1246b8146c550641b3217eef65792685ca2dcdc5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 16 Oct 2019 08:11:43 +0200 Subject: csky: remove ioremap_cache No driver that can be used on csky uses ioremap_cache, and this interface has been deprecated in favor of memremap. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren --- arch/csky/include/asm/io.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/csky/include/asm/io.h') diff --git a/arch/csky/include/asm/io.h b/arch/csky/include/asm/io.h index a4b9fb616faa..f572605d5ad5 100644 --- a/arch/csky/include/asm/io.h +++ b/arch/csky/include/asm/io.h @@ -36,13 +36,11 @@ /* * I/O memory mapping functions. */ -extern void __iomem *ioremap_cache(phys_addr_t addr, size_t size); extern void __iomem *__ioremap(phys_addr_t addr, size_t size, pgprot_t prot); extern void iounmap(void *addr); #define ioremap(addr, size) __ioremap((addr), (size), pgprot_noncached(PAGE_KERNEL)) #define ioremap_wc(addr, size) __ioremap((addr), (size), pgprot_writecombine(PAGE_KERNEL)) -#define ioremap_cache ioremap_cache #include -- cgit From 0055f67b596c3a8963192a42e25797b0e7fc0e92 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 13 Aug 2019 11:41:57 +0200 Subject: csky: use generic ioremap Use the generic ioremap_prot and iounmap helpers. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren --- arch/csky/include/asm/io.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'arch/csky/include/asm/io.h') diff --git a/arch/csky/include/asm/io.h b/arch/csky/include/asm/io.h index f572605d5ad5..332f51bc68fb 100644 --- a/arch/csky/include/asm/io.h +++ b/arch/csky/include/asm/io.h @@ -36,11 +36,9 @@ /* * I/O memory mapping functions. */ -extern void __iomem *__ioremap(phys_addr_t addr, size_t size, pgprot_t prot); -extern void iounmap(void *addr); - -#define ioremap(addr, size) __ioremap((addr), (size), pgprot_noncached(PAGE_KERNEL)) -#define ioremap_wc(addr, size) __ioremap((addr), (size), pgprot_writecombine(PAGE_KERNEL)) +#define ioremap_wc(addr, size) \ + ioremap_prot((addr), (size), \ + (_PAGE_IOREMAP & ~_CACHE_MASK) | _CACHE_UNCACHED) #include -- cgit