Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm/radix: Isolate hash table function from pseries guest code

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
d8c476ee caca285e

+13 -4
+11 -3
arch/powerpc/platforms/pseries/lpar.c
··· 89 89 "%lx failed with %ld\n", cpu, hwcpu, addr, ret); 90 90 return; 91 91 } 92 + 93 + #ifdef CONFIG_PPC_STD_MMU_64 92 94 /* 93 95 * PAPR says this feature is SLB-Buffer but firmware never 94 96 * reports that. All SPLPAR support SLB shadow buffer. 95 97 */ 96 - addr = __pa(paca[cpu].slb_shadow_ptr); 97 - if (firmware_has_feature(FW_FEATURE_SPLPAR)) { 98 + if (!radix_enabled() && firmware_has_feature(FW_FEATURE_SPLPAR)) { 99 + addr = __pa(paca[cpu].slb_shadow_ptr); 98 100 ret = register_slb_shadow(hwcpu, addr); 99 101 if (ret) 100 102 pr_err("WARNING: SLB shadow buffer registration for " 101 103 "cpu %d (hw %d) of area %lx failed with %ld\n", 102 104 cpu, hwcpu, addr, ret); 103 105 } 106 + #endif /* CONFIG_PPC_STD_MMU_64 */ 104 107 105 108 /* 106 109 * Register dispatch trace log, if one has been allocated. ··· 125 122 lppaca_of(cpu).dtl_enable_mask = 2; 126 123 } 127 124 } 125 + 126 + #ifdef CONFIG_PPC_STD_MMU_64 128 127 129 128 static long pSeries_lpar_hpte_insert(unsigned long hpte_group, 130 129 unsigned long vpn, unsigned long pa, ··· 660 655 661 656 void arch_free_page(struct page *page, int order) 662 657 { 658 + if (radix_enabled()) 659 + return; 663 660 if (!cmo_free_hint_flag || !firmware_has_feature(FW_FEATURE_CMO)) 664 661 return; 665 662 ··· 669 662 } 670 663 EXPORT_SYMBOL(arch_free_page); 671 664 672 - #endif 665 + #endif /* CONFIG_PPC_SMLPAR */ 666 + #endif /* CONFIG_PPC_STD_MMU_64 */ 673 667 674 668 #ifdef CONFIG_TRACEPOINTS 675 669 #ifdef HAVE_JUMP_LABEL
+2 -1
arch/powerpc/platforms/pseries/lparcfg.c
··· 484 484 seq_printf(m, "shared_processor_mode=%d\n", 485 485 lppaca_shared_proc(get_lppaca())); 486 486 487 + #ifdef CONFIG_PPC_STD_MMU_64 487 488 seq_printf(m, "slb_size=%d\n", mmu_slb_size); 488 - 489 + #endif 489 490 parse_em_data(m); 490 491 491 492 return 0;