summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf/power9-pmu.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-06-14 13:34:08 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-07-27 14:36:05 +0300
commit980bbf7ca72012d317617fcdbfabe8708e4cef29 (patch)
tree7959f70c5f868ae59c73d9c24586b17267b31f08 /arch/powerpc/perf/power9-pmu.c
parentf57261e69825b332f22480b37a33e03d066c0da2 (diff)
downloadlinux-980bbf7ca72012d317617fcdbfabe8708e4cef29.tar.xz
powerpc/32: Call mmu_mark_initmem_nx() regardless of data block mapping.
mark_initmem_nx() calls either mmu_mark_initmem_nx() or set_memory_attr() based on return from v_block_mapped() of _sinittext. But we can now handle text and data independently, so that text may be mapped by block even when data is mapped by pages. On the 8xx for instance, at startup 32Mbytes of memory are pinned in TLB. So the pinned entries need to go away for sinittext. In next patch a BAT will be set to also covers sinittext on book3s/32. So it will also be needed to call mmu_mark_initmem_nx() even when data above sinittext is not mapped with BATs. As this is highly dependent on the platform, call mmu_mark_initmem_nx() regardless of data block mapping. Then the platform will know what to do. Modify 8xx mmu_mark_initmem_nx() so that inittext mapping is modified only when pagealloc debug and kfence are not active, otherwise inittext is mapped with standard pages. And don't do anything on kernel text which is already mapped with PAGE_KERNEL_TEXT. Fixes: da1adea07576 ("powerpc/8xx: Allow STRICT_KERNEL_RwX with pinned TLB") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/db3fc14f3bfa6215b0786ef58a6e2bc1e1f964d7.1655202804.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/perf/power9-pmu.c')
0 files changed, 0 insertions, 0 deletions