diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2020-01-09 11:25:26 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-02-26 02:34:41 +0300 |
commit | 2efc7c085f05870eda6f29ac71eeb83f3bd54415 (patch) | |
tree | e1acd63a7ad7b0cc6a3fd7cf677cff72ff1e95fc /arch/powerpc/include | |
parent | 0b1c524caaae2428b20e714297243e5551251eb5 (diff) | |
download | linux-2efc7c085f05870eda6f29ac71eeb83f3bd54415.tar.xz |
powerpc/32: drop get_pteptr()
Commit 8d30c14cab30 ("powerpc/mm: Rework I$/D$ coherency (v3)") and
commit 90ac19a8b21b ("[POWERPC] Abolish iopa(), mm_ptov(),
io_block_mapping() from arch/powerpc") removed the use of get_pteptr()
outside of mm/pgtable_32.c
In mm/pgtable_32.c, the only user of get_pteptr() is change_page_attr()
which operates on kernel context and on lowmem pages only.
Make virt_to_kpte() available outside of mm/mem.c and use it instead
of get_pteptr(), and drop get_pteptr()
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/788378c6c3ba5c5298caab7c7f95e6c3c88244b8.1578558199.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 22bf7bb666a7..b80bfd41828d 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -51,6 +51,11 @@ static inline pmd_t *pmd_ptr_k(unsigned long va) { return pmd_offset(pud_offset(pgd_offset_k(va), va), va); } + +static inline pte_t *virt_to_kpte(unsigned long vaddr) +{ + return pte_offset_kernel(pmd_ptr_k(vaddr), vaddr); +} #endif #include <asm/tlbflush.h> |