[PATCH] powerpc/32s: Allocate one 256k IBAT instead of two consecutives 128k IBATs

Michael Ellerman mpe at ellerman.id.au
Fri Dec 3 14:55:09 AEDT 2021


Christophe Leroy <christophe.leroy at csgroup.eu> writes:
> 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 256Mbytes last block:
                 ^

I think that's meant to be 256Kbytes, I changed it when committing.

> 	---[ 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 at csgroup.eu>


cheers


More information about the Linuxppc-dev mailing list