]> 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)
commit90fddbd3a5f67b8dc64102839acbadb60e47e095
treeb195670447b52622a4f3b9679db3e6ec189d4054
parenta9a56f1f06697a8a98d7a11bf39b25b02c97746f
powerpc/mm: Fixup kernel read only mapping

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