linux-stable/arch/powerpc
Christophe Leroy 37eb7ca91b powerpc/32s: Allocate one 256k IBAT instead of two consecutives 128k IBATs
Today we have the following IBATs allocated:

	---[ Instruction Block Address Translation ]---
	0: 0xc0000000-0xc03fffff 0x00000000         4M Kernel   x     m
	1: 0xc0400000-0xc05fffff 0x00400000         2M Kernel   x     m
	2: 0xc0600000-0xc06fffff 0x00600000         1M Kernel   x     m
	3: 0xc0700000-0xc077ffff 0x00700000       512K Kernel   x     m
	4: 0xc0780000-0xc079ffff 0x00780000       128K Kernel   x     m
	5: 0xc07a0000-0xc07bffff 0x007a0000       128K Kernel   x     m
	6:         -
	7:         -

The two 128K should be a single 256K instead.

When _etext is not aligned to 128Kbytes, the system will allocate
all necessary BATs to the lower 128Kbytes boundary, then allocate
an additional 128Kbytes BAT for the remaining block.

Instead, align the top to 128Kbytes so that the function directly
allocates a 256Kbytes last block:

	---[ Instruction Block Address Translation ]---
	0: 0xc0000000-0xc03fffff 0x00000000         4M Kernel   x     m
	1: 0xc0400000-0xc05fffff 0x00400000         2M Kernel   x     m
	2: 0xc0600000-0xc06fffff 0x00600000         1M Kernel   x     m
	3: 0xc0700000-0xc077ffff 0x00700000       512K Kernel   x     m
	4: 0xc0780000-0xc07bffff 0x00780000       256K Kernel   x     m
	5:         -
	6:         -
	7:         -

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ab58b296832b0ec650e2203200e060adbcb2677d.1637930421.git.christophe.leroy@csgroup.eu
2021-12-09 22:41:20 +11:00
..
boot powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
configs powerpc/microwatt: add POWER9_CPU, clear PPC_64S_HASH_MMU 2021-12-09 22:41:16 +11:00
crypto powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
include powerpc: Add KUAP support for BOOKE and 40x 2021-12-09 22:41:19 +11:00
kernel powerpc/kuap: Wire-up KUAP on 85xx in 32 bits mode. 2021-12-09 22:41:20 +11:00
kexec powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
kvm powerpc/64s: Make hash MMU support configurable 2021-12-09 22:40:24 +11:00
lib powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
math-emu
mm powerpc/32s: Allocate one 256k IBAT instead of two consecutives 128k IBATs 2021-12-09 22:41:20 +11:00
net bpf ppc32: Access only if addr is kernel address 2021-11-25 11:25:32 +11:00
perf powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC 2021-11-30 17:15:49 +11:00
platforms powerpc: Remove CONFIG_PPC_HAVE_KUAP and CONFIG_PPC_HAVE_KUEP 2021-12-09 22:41:20 +11:00
purgatory
sysdev powerpc/xive: Fix compile when !CONFIG_PPC_POWERNV. 2021-12-02 10:40:38 +11:00
tools powerpc/head_check: Fix shellcheck errors 2021-08-17 22:52:02 +10:00
xmon powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
Makefile.postlink