linux/arch/powerpc
Christophe Leroy 980bbf7ca7 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: da1adea075 ("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
2022-07-27 21:36:05 +10:00
..
boot powerpc: dts: turris1x.dts: Add CPLD reboot node 2022-07-27 21:36:03 +10:00
configs powerpc: Restore CONFIG_DEBUG_INFO in defconfigs 2022-06-29 16:58:49 +10:00
crypto powerpc: Fix all occurences of duplicate words 2022-07-25 12:05:15 +10:00
include powerpc/64s: Remove spurious fault flushing for NMMU 2022-07-27 21:36:04 +10:00
kernel powerpc/mce: use early_cpu_to_node() in mce_init() 2022-07-27 21:36:04 +10:00
kexec powerpc: Include asm/firmware.h in all users of firmware_has_feature() 2022-06-29 16:45:05 +10:00
kvm powerpc: Fix all occurences of duplicate words 2022-07-25 12:05:15 +10:00
lib powerpc/64: Drop ppc_inst_as_str() 2022-06-29 19:37:07 +10:00
math-emu
mm powerpc/32: Call mmu_mark_initmem_nx() regardless of data block mapping. 2022-07-27 21:36:05 +10:00
net powerpc/bpf/32: Add instructions for atomic_[cmp]xchg 2022-06-29 19:37:08 +10:00
perf powerpc/perf: Add support for caps under sysfs in powerpc 2022-07-18 10:39:54 +10:00
platforms powerpc/pseries/mobility: set NMI watchdog factor during an LPM 2022-07-27 21:36:03 +10:00
purgatory powerpc/purgatory: Omit use of bin2c 2022-07-27 21:36:03 +10:00
sysdev powerpc/fsl-pci: Fix Class Code of PCIe Root Port 2022-07-27 21:36:03 +10:00
tools
xmon powerpc/64: Drop ppc_inst_as_str() 2022-06-29 19:37:07 +10:00
Kbuild
Kconfig powerpc/pci: Add config option for using all 256 PCI buses 2022-07-27 21:36:04 +10:00
Kconfig.debug powerpc: Kconfig.debug: Remove extra empty line 2022-06-29 19:43:16 +10:00
Makefile
Makefile.postlink