diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2019-08-20 14:07:18 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-08-27 13:03:35 +1000 |
commit | 191e42063a7241e5c3a1d1f36896a20b147517e9 (patch) | |
tree | c24c31be3b9304daa91f7399ef622f2adcdc7d91 /arch/powerpc/include | |
parent | powerpc/mm: Move ioremap functions out of pgtable_32/64.c (diff) | |
download | linux-dev-191e42063a7241e5c3a1d1f36896a20b147517e9.tar.xz linux-dev-191e42063a7241e5c3a1d1f36896a20b147517e9.zip |
powerpc/mm: refactor ioremap_range() and use ioremap_page_range()
book3s64's ioremap_range() is almost same as fallback ioremap_range(),
except that it calls radix__ioremap_range() when radix is enabled.
radix__ioremap_range() is also very similar to the other ones, expect
that it calls ioremap_page_range when slab is available.
PPC32 __ioremap_caller() have a loop doing the same thing as
ioremap_range() so use it on PPC32 as well.
Lets keep only one version of ioremap_range() which calls
ioremap_page_range() on all platforms when slab is available.
At the same time, drop the nid parameter which is not used.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/4b1dca7096b01823b101be7338983578641547f1.1566309263.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/radix.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/io.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index e04a839cb5b9..574eca33f893 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h @@ -266,9 +266,6 @@ extern void radix__vmemmap_remove_mapping(unsigned long start, extern int radix__map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t flags, unsigned int psz); -extern int radix__ioremap_range(unsigned long ea, phys_addr_t pa, - unsigned long size, pgprot_t prot, int nid); - static inline unsigned long radix__get_tree_size(void) { unsigned long rts_field; diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 8e65ba59f06a..8e00d95f9600 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -722,6 +722,8 @@ void __iomem *ioremap_coherent(phys_addr_t address, unsigned long size); extern void iounmap(volatile void __iomem *addr); +int ioremap_range(unsigned long ea, phys_addr_t pa, unsigned long size, pgprot_t prot); + extern void __iomem *__ioremap_caller(phys_addr_t, unsigned long size, pgprot_t prot, void *caller); |