diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2016-04-29 23:26:00 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-05-01 18:33:03 +1000 |
commit | d9225ad923514252ec8d10dac67e5a7a2f0aa345 (patch) | |
tree | 8294cdec247696696393f5875869cc5c502bd3e2 /arch/powerpc/include | |
parent | 31a14fae92b29b7a7fcc65600f072bf448d3b0eb (diff) | |
download | linux-d9225ad923514252ec8d10dac67e5a7a2f0aa345.tar.bz2 |
powerpc/mm/radix: Add radix callbacks for vmemmap and map_kernel page()
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/pgtable.h | 12 | ||||
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/radix.h | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index c1b787dcfbb6..9bc2471a8207 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -725,6 +725,13 @@ void pgtable_cache_init(void); static inline int map_kernel_page(unsigned long ea, unsigned long pa, unsigned long flags) { + if (radix_enabled()) { +#if defined(CONFIG_PPC_RADIX_MMU) && defined(DEBUG_VM) + unsigned long page_size = 1 << mmu_psize_defs[mmu_io_psize].shift; + WARN((page_size != PAGE_SIZE), "I/O page size != PAGE_SIZE"); +#endif + return radix__map_kernel_page(ea, pa, __pgprot(flags), PAGE_SIZE); + } return hash__map_kernel_page(ea, pa, flags); } @@ -732,6 +739,8 @@ static inline int __meminit vmemmap_create_mapping(unsigned long start, unsigned long page_size, unsigned long phys) { + if (radix_enabled()) + return radix__vmemmap_create_mapping(start, page_size, phys); return hash__vmemmap_create_mapping(start, page_size, phys); } @@ -739,6 +748,9 @@ static inline int __meminit vmemmap_create_mapping(unsigned long start, static inline void vmemmap_remove_mapping(unsigned long start, unsigned long page_size) { + + if (radix_enabled()) + return radix__vmemmap_remove_mapping(start, page_size); return hash__vmemmap_remove_mapping(start, page_size); } #endif diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index a26259fcffd6..63eb629a8b64 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h @@ -130,6 +130,12 @@ static inline int radix__pmd_trans_huge(pmd_t pmd) #endif +extern int __meminit radix__vmemmap_create_mapping(unsigned long start, + unsigned long page_size, + unsigned long phys); +extern void radix__vmemmap_remove_mapping(unsigned long start, + unsigned long page_size); + extern int radix__map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t flags, unsigned int psz); #endif /* __ASSEMBLY__ */ |