summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/pgtable-radix.c
diff options
context:
space:
mode:
authorAlistair Popple2016-12-14 03:36:51 +0100
committerMichael Ellerman2017-01-30 10:24:33 +0100
commit1d0761d2557d1540727723e4f05395d53321d555 (patch)
tree1968b9aec5a02164d15655cd9a47e75c66e0d4ca /arch/powerpc/mm/pgtable-radix.c
parentpowerpc/mm: Allow memory hotplug into an offline node (diff)
downloadkernel-qcow2-linux-1d0761d2557d1540727723e4f05395d53321d555.tar.gz
kernel-qcow2-linux-1d0761d2557d1540727723e4f05395d53321d555.tar.xz
kernel-qcow2-linux-1d0761d2557d1540727723e4f05395d53321d555.zip
powerpc/powernv: Initialise nest mmu
POWER9 contains an off core mmu called the nest mmu (NMMU). This is used by other hardware units on the chip to translate virtual addresses into real addresses. The unit attempting an address translation provides the majority of the context required for the translation request except for the base address of the partition table (ie. the PTCR) which needs to be programmed into the NMMU. This patch adds a call to OPAL to set the PTCR for the nest mmu in opal_init(). Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/pgtable-radix.c')
-rw-r--r--arch/powerpc/mm/pgtable-radix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
index cfa53ccc8baf..086522b7c60f 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -18,6 +18,7 @@
#include <asm/machdep.h>
#include <asm/mmu.h>
#include <asm/firmware.h>
+#include <asm/powernv.h>
#include <trace/events/thp.h>
@@ -438,6 +439,7 @@ void radix__mmu_cleanup_all(void)
lpcr = mfspr(SPRN_LPCR);
mtspr(SPRN_LPCR, lpcr & ~LPCR_UPRT);
mtspr(SPRN_PTCR, 0);
+ powernv_set_nmmu_ptcr(0);
radix__flush_tlb_all();
}
}