sh-mm-convert-to-generic_ioremap.patch removed from -mm tree
The quilt patch titled
Subject: sh: mm: convert to GENERIC_IOREMAP
has been removed from the -mm tree. Its filename was
sh-mm-convert-to-generic_ioremap.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: sh: mm: convert to GENERIC_IOREMAP
Date: Thu, 6 Jul 2023 23:45:13 +0800
By taking GENERIC_IOREMAP method, the generic generic_ioremap_prot(), generic_iounmap(), and their generic wrapper ioremap_prot(), ioremap() and iounmap() are all visible and available to arch. Arch needs to provide wrapper functions to override the generic versions if there's arch specific handling in its ioremap_prot(), ioremap() or iounmap(). This change will simplify implementation by removing duplicated code with generic_ioremap_prot() and generic_iounmap(), and has the equivalent functioality as before.
Here, add wrapper functions ioremap_prot() and iounmap() for SuperH's special operation when ioremap() and iounmap().
---
arch/sh/Kconfig | 1 arch/sh/include/asm/io.h | 40 ++++------------------ arch/sh/mm/ioremap.c | 65 ++++++------------------------------- 3 files changed, 20 insertions(+), 86 deletions(-)
arch/sh/include/asm/io.h renamed from arch/sh/include/asm/io.h~sh-mm-convert-to-generic_ioremap +8 -32
@@ -290,40 +290,16 @@ unsigned long long poke_real_address_q(u#endif #ifdef CONFIG_MMU -void iounmap (void __iomem *addr); -void __iomem *__ioremap_caller (phys_addr_t offset,unsigned long size, -pgprot_t prot,void *caller); +/* +* I/O memory mapping functions. +*/ +#define ioremap_prot ioremap_prot +#define iounmap iounmap -static inline void __iomem *ioremap (phys_addr_t offset,unsigned long size) -{ -return __ioremap_caller (offset, size,PAGE_KERNEL_NOCACHE , -__builtin_return_address (0 )); -} +#define _PAGE_IOREMAP pgprot_val(PAGE_KERNEL_NOCACHE) -static inline void __iomem * -ioremap_cache (phys_addr_t offset,unsigned long size) -{ -return __ioremap_caller (offset, size,PAGE_KERNEL , -__builtin_return_address (0 )); -} -#define ioremap_cache ioremap_cache - -#ifdef CONFIG_HAVE_IOREMAP_PROT -static inline void __iomem *ioremap_prot (phys_addr_t offset,unsigned long size, -unsigned long flags) -{ -return __ioremap_caller (offset, size,__pgprot (flags), -__builtin_return_address (0 )); -} -#endif /* CONFIG_HAVE_IOREMAP_PROT */ - -#else /* CONFIG_MMU */ -static inline void __iomem *ioremap (phys_addr_t offset,size_t size) -{ -return (void __iomem *)(unsigned long )offset; -} - -static inline void iounmap (volatile void __iomem *addr) { } +#define ioremap_cache (addr, size) \ + ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))#endif /* CONFIG_MMU */ #define ioremap_uc ioremap
arch/sh/Kconfig renamed from arch/sh/Kconfig~sh-mm-convert-to-generic_ioremap +1 -0
@@ -29,6 +29,7 @@ config SUPERH select GENERIC_SMP_IDLE_THREAD select GUP_GET_PXX_LOW_HIGH if X2TLB select HAS_IOPORT if HAS_IOPORT_MAP + select GENERIC_IOREMAP if MMU select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_KGDB select HAVE_ARCH_SECCOMP_FILTER
arch/sh/mm/ioremap.c renamed from arch/sh/mm/ioremap.c~sh-mm-convert-to-generic_ioremap +11 -54
109 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
net-altera-tse-make-altera_tse-depend-on-has_iomem.patch irqchip-al-fic-make-al_fic-depend-on-has_iomem.patch