aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-05 01:03:58 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-21 04:59:09 -0400
commit7025776ed1ebdfa1959932e7a4662c2f88607df0 (patch)
tree4b1b0e0be66d8a0b9d2a266a036416c01877ea41 /arch/powerpc/platforms
parentb521f576df6c49fcc06fbc06a349f7590f223a38 (diff)
powerpc/mm: Move hash table ops to a separate structure
Moving probe_machine() to after mmu init will cause the ppc_md fields relative to the hash table management to be overwritten. Since we have essentially disconnected the machine type from the hash backend ops, finish the job by moving them to a different structure. The only callback that didn't quite fix is update_partition_table since this is not specific to hash, so I moved it to a standalone variable for now. We can revisit later if needed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [mpe: Fix ppc64e build failure in kexec] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/ps3/htab.c12
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c18
2 files changed, 15 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index c9a3e677192a..cb3c50328de8 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -195,12 +195,12 @@ static void ps3_hpte_clear(void)
195 195
196void __init ps3_hpte_init(unsigned long htab_size) 196void __init ps3_hpte_init(unsigned long htab_size)
197{ 197{
198 ppc_md.hpte_invalidate = ps3_hpte_invalidate; 198 mmu_hash_ops.hpte_invalidate = ps3_hpte_invalidate;
199 ppc_md.hpte_updatepp = ps3_hpte_updatepp; 199 mmu_hash_ops.hpte_updatepp = ps3_hpte_updatepp;
200 ppc_md.hpte_updateboltedpp = ps3_hpte_updateboltedpp; 200 mmu_hash_ops.hpte_updateboltedpp = ps3_hpte_updateboltedpp;
201 ppc_md.hpte_insert = ps3_hpte_insert; 201 mmu_hash_ops.hpte_insert = ps3_hpte_insert;
202 ppc_md.hpte_remove = ps3_hpte_remove; 202 mmu_hash_ops.hpte_remove = ps3_hpte_remove;
203 ppc_md.hpte_clear_all = ps3_hpte_clear; 203 mmu_hash_ops.hpte_clear_all = ps3_hpte_clear;
204 204
205 ppc64_pft_size = __ilog2(htab_size); 205 ppc64_pft_size = __ilog2(htab_size);
206} 206}
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 03c732afef34..0e91388d0af9 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -591,15 +591,15 @@ __setup("bulk_remove=", disable_bulk_remove);
591 591
592void __init hpte_init_lpar(void) 592void __init hpte_init_lpar(void)
593{ 593{
594 ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate; 594 mmu_hash_ops.hpte_invalidate = pSeries_lpar_hpte_invalidate;
595 ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp; 595 mmu_hash_ops.hpte_updatepp = pSeries_lpar_hpte_updatepp;
596 ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; 596 mmu_hash_ops.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
597 ppc_md.hpte_insert = pSeries_lpar_hpte_insert; 597 mmu_hash_ops.hpte_insert = pSeries_lpar_hpte_insert;
598 ppc_md.hpte_remove = pSeries_lpar_hpte_remove; 598 mmu_hash_ops.hpte_remove = pSeries_lpar_hpte_remove;
599 ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted; 599 mmu_hash_ops.hpte_removebolted = pSeries_lpar_hpte_removebolted;
600 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; 600 mmu_hash_ops.flush_hash_range = pSeries_lpar_flush_hash_range;
601 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; 601 mmu_hash_ops.hpte_clear_all = pSeries_lpar_hptab_clear;
602 ppc_md.hugepage_invalidate = pSeries_lpar_hugepage_invalidate; 602 mmu_hash_ops.hugepage_invalidate = pSeries_lpar_hugepage_invalidate;
603} 603}
604 604
605#ifdef CONFIG_PPC_SMLPAR 605#ifdef CONFIG_PPC_SMLPAR