]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
commit984d7a1ec67ce3a46324fa4bcb4c745bbc266cf2
treeb195670447b52622a4f3b9679db3e6ec189d4054
parenta1ff57416af9a7971a801d553cd53edd8afb28d6
powerpc/mm: Fixup kernel read only mapping

With commit e58e87adc8bf9 ("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: e58e87adc8bf9 ("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