powerpc: move __end_rodata to cover arch read-only sections
authorNicholas Piggin <npiggin@gmail.com>
Fri, 16 Sep 2022 04:07:49 +0000 (14:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Sep 2022 10:58:16 +0000 (20:58 +1000)
commit7082f8e7d2276575a8806370007cbb4a7b9abdce
tree8b534ee44f283a58de7353121e364a7f9e524747
parentb150a4d12b919baf956b807aa305cf78df03d0fe
powerpc: move __end_rodata to cover arch read-only sections

powerpc has a number of read-only sections and tables that are put after
RO_DATA(). Move the __end_rodata symbol to cover these as well.

Setting memory to read-only at boot is done using __init_begin, change
that to use __end_rodata.

This makes is_kernel_rodata() exactly cover the read-only region, as
well as other things using __end_rodata (e.g., kernel/dma/debug.c).
Boot dmesg also prints the rodata size more accurately.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220916040755.2398112-2-npiggin@gmail.com
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/book3s64/hash_pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/pgtable_32.c