aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/book3s64/pgtable.c
diff options
context:
space:
mode:
authorClaudio Carvalho <cclaudio@linux.ibm.com>2019-08-22 00:48:36 -0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-30 09:40:16 +1000
commit5223134029a87db925ecc9449f9501bad391a52e (patch)
tree7dcd197f295a1ed6f08a824ed5144d91ca7f8f6b /arch/powerpc/mm/book3s64/pgtable.c
parentpowerpc/mm: Use UV_WRITE_PATE ucall to register a PATE (diff)
downloadlinux-dev-5223134029a87db925ecc9449f9501bad391a52e.tar.xz
linux-dev-5223134029a87db925ecc9449f9501bad391a52e.zip
powerpc/mm: Write to PTCR only if ultravisor disabled
In ultravisor enabled systems, PTCR becomes ultravisor privileged only for writing and an attempt to write to it will cause a Hypervisor Emulation Assitance interrupt. This patch uses the set_ptcr_when_no_uv() function to restrict PTCR writing to only when ultravisor is disabled. Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190822034838.27876-6-cclaudio@linux.ibm.com
Diffstat (limited to 'arch/powerpc/mm/book3s64/pgtable.c')
-rw-r--r--arch/powerpc/mm/book3s64/pgtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/book3s64/pgtable.c b/arch/powerpc/mm/book3s64/pgtable.c
index 4173f6931009..01a7570c10e0 100644
--- a/arch/powerpc/mm/book3s64/pgtable.c
+++ b/arch/powerpc/mm/book3s64/pgtable.c
@@ -207,7 +207,7 @@ void __init mmu_partition_table_init(void)
* 64 K size.
*/
ptcr = __pa(partition_tb) | (PATB_SIZE_SHIFT - 12);
- mtspr(SPRN_PTCR, ptcr);
+ set_ptcr_when_no_uv(ptcr);
powernv_set_nmmu_ptcr(ptcr);
}