aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-06-23 04:16:38 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-27 21:59:47 -0400
commit7d0daae4ae1a3e80d78b83cddf414a3b98a962f4 (patch)
treef8dcd24a598212b58652c771a5e81c8a167bb3d1 /arch/powerpc/platforms/pseries
parent7a4571ae553e2972b7958306fd796a2fd24fd7d1 (diff)
[POWERPC] powerpc: Initialise ppc_md htab pointers earlier
Initialise the ppc_md htab callbacks earlier, in the probe routines. This allows us to call htab_finish_init() from htab_initialize(), and makes it private to hash_utils_64.c. Move htab_finish_init() and make_bl() above htab_initialize() to avoid forward declarations. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c4
-rw-r--r--arch/powerpc/platforms/pseries/setup.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 634b7d06d3cc..27480705996f 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -513,7 +513,7 @@ void pSeries_lpar_flush_hash_range(unsigned long number, int local)
513 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); 513 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
514} 514}
515 515
516void hpte_init_lpar(void) 516void __init hpte_init_lpar(void)
517{ 517{
518 ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate; 518 ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate;
519 ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp; 519 ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp;
@@ -522,6 +522,4 @@ void hpte_init_lpar(void)
522 ppc_md.hpte_remove = pSeries_lpar_hpte_remove; 522 ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
523 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; 523 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
524 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; 524 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
525
526 htab_finish_init();
527} 525}
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 1e28518c6121..b3197ff156c6 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -322,11 +322,6 @@ static void __init pSeries_init_early(void)
322 DBG(" -> pSeries_init_early()\n"); 322 DBG(" -> pSeries_init_early()\n");
323 323
324 fw_feature_init(); 324 fw_feature_init();
325
326 if (firmware_has_feature(FW_FEATURE_LPAR))
327 hpte_init_lpar();
328 else
329 hpte_init_native();
330 325
331 if (firmware_has_feature(FW_FEATURE_LPAR)) 326 if (firmware_has_feature(FW_FEATURE_LPAR))
332 find_udbg_vterm(); 327 find_udbg_vterm();
@@ -384,6 +379,11 @@ static int __init pSeries_probe_hypertas(unsigned long node,
384 if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL) 379 if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL)
385 powerpc_firmware_features |= FW_FEATURE_LPAR; 380 powerpc_firmware_features |= FW_FEATURE_LPAR;
386 381
382 if (firmware_has_feature(FW_FEATURE_LPAR))
383 hpte_init_lpar();
384 else
385 hpte_init_native();
386
387 return 1; 387 return 1;
388} 388}
389 389