powerpc/mm/hash: Implement mark_rodata_ro() for hash
authorBalbir Singh <bsingharora@gmail.com>
Wed, 28 Jun 2017 17:04:08 +0000 (03:04 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 4 Jul 2017 01:35:16 +0000 (11:35 +1000)
commitcd65d69713349fc7b33fa9de2b32989b99c9fb39
tree31d67b092228886108a0339c6953064c01b2a3b0
parentd924cc3feda9c2bea8164930899f367ce249cbbf
powerpc/mm/hash: Implement mark_rodata_ro() for hash

With hash we update the bolted pte to mark it read-only. We rely
on the MMU_FTR_KERNEL_RO to generate the correct permissions
for read-only text. The radix implementation just prints a warning
in this implementation

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
[mpe: Make the warning louder when we don't have MMU_FTR_KERNEL_RO]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/book3s/64/radix.h
arch/powerpc/mm/pgtable-hash64.c
arch/powerpc/mm/pgtable_64.c