diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2014-04-30 23:14:40 (GMT) |
---|---|---|
committer | Jose Rivera <German.Rivera@freescale.com> | 2014-05-03 03:42:17 (GMT) |
commit | 3542f67716391c7afccf30c44ef6cd59b6f79709 (patch) | |
tree | 2d40d7cef7a40af1c99e828da2476b8a26beb5c4 /arch | |
parent | fe243d9ca31d9752255041f63d7489238dee47e8 (diff) | |
download | linux-fsl-qoriq-3542f67716391c7afccf30c44ef6cd59b6f79709.tar.xz |
powerpc: move epapr paravirt init of power_save to an initcall
some restructuring of epapr paravirt init resulted in
ppc_md.power_save being set, and then overwritten to
NULL during machine_init. This patch splits the
initialization of ppc_md.power_save out into a postcore
init call.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Change-Id: Id054bb9ab6b451d64835988a6b2ebe6cd54f85c3
Reviewed-on: http://git.am.freescale.net:8181/11766
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/epapr_paravirt.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c index 6300c13..fe5b5c3 100644 --- a/arch/powerpc/kernel/epapr_paravirt.c +++ b/arch/powerpc/kernel/epapr_paravirt.c @@ -29,6 +29,7 @@ extern u32 epapr_ev_idle_start[]; #endif bool epapr_paravirt_enabled; +static bool epapr_has_idle; static int __init early_init_dt_scan_epapr(unsigned long node, const char *uname, @@ -54,7 +55,7 @@ static int __init early_init_dt_scan_epapr(unsigned long node, #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) if (of_get_flat_dt_prop(node, "has-idle", NULL)) - ppc_md.power_save = epapr_ev_idle; + epapr_has_idle = true; #endif epapr_paravirt_enabled = true; @@ -69,3 +70,12 @@ int __init epapr_paravirt_early_init(void) return 0; } +static int __init epapr_idle_init(void) +{ + if (epapr_has_idle) + ppc_md.power_save = epapr_ev_idle; + + return 0; +} + +postcore_initcall(epapr_idle_init); |