]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Fixup kernel read only mapping
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 24 Nov 2016 09:39:54 +0000 (15:09 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 25 Nov 2016 03:18:25 +0000 (14:18 +1100)
commit3694509150545c51f0acdb832362a5fb7f530d34
treeb195670447b52622a4f3b9679db3e6ec189d4054
parent2ac399ff1f19a55d34824cd8068af2f822dc16bb
powerpc/mm: Fixup kernel read only mapping

With commit f44dfae09fd1a ("powerpc/mm: Update _PAGE_KERNEL_RO") we
started using the ppp value 0b110 to map kernel readonly. But that
facility was only added as part of ISA 2.04. For earlier ISA version
only supported ppp bit value for readonly mapping is 0b011. (This
implies both user and kernel get mapped using the same ppp bit value for
readonly mapping.).
Update the code such that for earlier architecture version we use ppp
value 0b011 for readonly mapping. We don't differentiate between power5+
and power5 here and apply the new ppp bits only from power6 (ISA 2.05).
This keep the changes minimal.

This fixes issue with PS3 spu usage reported at
https://lkml.kernel.org/r/rep.1421449714.geoff@infradead.org

Fixes: f44dfae09fd1a ("powerpc/mm: Update _PAGE_KERNEL_RO")
Cc: stable@vger.kernel.org # v4.7+
Tested-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu.h
arch/powerpc/mm/hash_utils_64.c