diff options
| author | Will Deacon <will@kernel.org> | 2022-07-25 10:56:23 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2022-07-25 10:56:23 +0100 |
| commit | 84d8857af43a9d4289c53955f4d221ebda548b97 (patch) | |
| tree | 519114c6a4f8f36bf571cda6ad5eab798259aece /include | |
| parent | ee8b00a956e104e7cf52bb138ab597bf32ec46fc (diff) | |
| parent | 893dea9ccd08dab924839354aba21d4ed7a9abc0 (diff) | |
| download | linux-84d8857af43a9d4289c53955f4d221ebda548b97.tar.gz linux-84d8857af43a9d4289c53955f4d221ebda548b97.tar.bz2 linux-84d8857af43a9d4289c53955f4d221ebda548b97.zip | |
Merge branch 'for-next/ioremap' into for-next/core
* for-next/ioremap:
arm64: Add HAVE_IOREMAP_PROT support
arm64: mm: Convert to GENERIC_IOREMAP
mm: ioremap: Add ioremap/iounmap_allowed()
mm: ioremap: Setup phys_addr of struct vm_struct
mm: ioremap: Use more sensible name in ioremap_prot()
ARM: mm: kill unused runtime hook arch_iounmap()
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/io.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 7ce93aaf69f8..db5b890eaff7 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -964,7 +964,34 @@ static inline void iounmap(volatile void __iomem *addr) #elif defined(CONFIG_GENERIC_IOREMAP) #include <linux/pgtable.h> -void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot); +/* + * Arch code can implement the following two hooks when using GENERIC_IOREMAP + * ioremap_allowed() return a bool, + * - true means continue to remap + * - false means skip remap and return directly + * iounmap_allowed() return a bool, + * - true means continue to vunmap + * - false means skip vunmap and return directly + */ +#ifndef ioremap_allowed +#define ioremap_allowed ioremap_allowed +static inline bool ioremap_allowed(phys_addr_t phys_addr, size_t size, + unsigned long prot) +{ + return true; +} +#endif + +#ifndef iounmap_allowed +#define iounmap_allowed iounmap_allowed +static inline bool iounmap_allowed(void *addr) +{ + return true; +} +#endif + +void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size, + unsigned long prot); void iounmap(volatile void __iomem *addr); static inline void __iomem *ioremap(phys_addr_t addr, size_t size) |
