powerpc/mm: Add a helper to select PAGE_KERNEL_RO or PAGE_READONLY
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 21 Aug 2019 10:20:00 +0000 (10:20 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Sep 2019 22:36:53 +0000 (08:36 +1000)
commit4c0f5d1eb4072871c34530358df45f05ab80edd6
treedb91d2da1a31b18e6da69dd089aa660c2686c7ef
parent13c7bb3c57dcfe779ea5b4b083f6c47753cc5327
powerpc/mm: Add a helper to select PAGE_KERNEL_RO or PAGE_READONLY

In a couple of places there is a need to select whether read-only
protection of shadow pages is performed with PAGE_KERNEL_RO or with
PAGE_READONLY.

Add a helper to avoid duplicating the choice.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9f33f44b9cd741c4a02b3dce7b8ef9438fe2cd2a.1566382750.git.christophe.leroy@c-s.fr
arch/powerpc/mm/kasan/kasan_init_32.c