aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-07-13 05:35:21 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-17 02:42:50 -0400
commitbf16cdf48a5369ba29614a0ade4ae5daf7a9e47c (patch)
tree4abc3ff7bb6e15944e9a377bfe4a6064b457a402 /arch/powerpc/mm
parent8cd6d3c23e226ec6cb8825e1aa6a391ebda71c72 (diff)
powerpc/mm/radix: Update LPCR HR bit as per ISA
PowerISA 3.0 requires the MMU mode (radix vs. hash) of the hypervisor to be mirrored in the LPCR register, in addition to the partition table. This is done to avoid fetching from the table when deciding, among other things, how to perform transitions to HV mode on some interrupts. So let's set it up appropriately Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/pgtable-radix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
index 7931e1496f0d..4732fa3fe591 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -342,7 +342,7 @@ void __init radix__early_init_mmu(void)
342 radix_init_page_sizes(); 342 radix_init_page_sizes();
343 if (!firmware_has_feature(FW_FEATURE_LPAR)) { 343 if (!firmware_has_feature(FW_FEATURE_LPAR)) {
344 lpcr = mfspr(SPRN_LPCR); 344 lpcr = mfspr(SPRN_LPCR);
345 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT); 345 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR);
346 radix_init_partition_table(); 346 radix_init_partition_table();
347 } 347 }
348 348
@@ -357,7 +357,7 @@ void radix__early_init_mmu_secondary(void)
357 */ 357 */
358 if (!firmware_has_feature(FW_FEATURE_LPAR)) { 358 if (!firmware_has_feature(FW_FEATURE_LPAR)) {
359 lpcr = mfspr(SPRN_LPCR); 359 lpcr = mfspr(SPRN_LPCR);
360 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT); 360 mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR);
361 361
362 mtspr(SPRN_PTCR, 362 mtspr(SPRN_PTCR,
363 __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); 363 __pa(partition_tb) | (PATB_SIZE_SHIFT - 12));