]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32: Don't populate page tables for block mapped pages except on the 8xx.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 23 Aug 2019 09:56:21 +0000 (09:56 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 Nov 2019 11:27:52 +0000 (22:27 +1100)
commit3e5de775cc68adeb2866c5f0db837b6bc2dbf219
tree0dc5d7e43238c3fe65d26bcef49a37cd8b5f68e5
parentf762d93de237da6e838092b245a879cb6e82c6d2
powerpc/32: Don't populate page tables for block mapped pages except on the 8xx.

Commit b1b70f4a41eb ("powerpc/32: always populate page tables for
Abatron BDI.") wrongly sets page tables for any PPC32 for using BDI,
and does't update them after init (remove RX on init section, set
text and rodata read-only)

Only the 8xx requires page tables to be populated for using the BDI.
They also need to be populated in order to see the mappings in
/sys/kernel/debug/kernel_page_tables

On BOOK3S_32, pages that are not mapped by page tables are mapped
by BATs. The BDI knows BATs and they can be viewed in
/sys/kernel/debug/powerpc/block_address_translation

Only set pagetables for RAM and IMMR on the 8xx and properly update
them at the end of init.

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/c8610942203e0d93fcb02ad20c57edd3adb4c9d3.1566554029.git.christophe.leroy@c-s.fr
arch/powerpc/mm/nohash/8xx.c
arch/powerpc/mm/pgtable_32.c