diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2014-04-30 19:34:23 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-05-22 19:08:21 -0400 |
commit | 83e267d797e0e69d0ac5741f5dc88a2df3ebb3a0 (patch) | |
tree | 5cff53ddfee04e8dc75903aeaf40442a4a8877f3 | |
parent | 2b09c6038941b8ba6ee9b3851c7be50a9f3acedf (diff) |
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>
Signed-off-by: Scott Wood <scottwood@freescale.com>
-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 7898be90f2dc..8a7a62c85604 100644 --- a/arch/powerpc/kernel/epapr_paravirt.c +++ b/arch/powerpc/kernel/epapr_paravirt.c | |||
@@ -30,6 +30,7 @@ extern u32 epapr_ev_idle_start[]; | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | bool epapr_paravirt_enabled; | 32 | bool epapr_paravirt_enabled; |
33 | static bool epapr_has_idle; | ||
33 | 34 | ||
34 | static int __init early_init_dt_scan_epapr(unsigned long node, | 35 | static int __init early_init_dt_scan_epapr(unsigned long node, |
35 | const char *uname, | 36 | const char *uname, |
@@ -55,7 +56,7 @@ static int __init early_init_dt_scan_epapr(unsigned long node, | |||
55 | 56 | ||
56 | #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) | 57 | #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) |
57 | if (of_get_flat_dt_prop(node, "has-idle", NULL)) | 58 | if (of_get_flat_dt_prop(node, "has-idle", NULL)) |
58 | ppc_md.power_save = epapr_ev_idle; | 59 | epapr_has_idle = true; |
59 | #endif | 60 | #endif |
60 | 61 | ||
61 | epapr_paravirt_enabled = true; | 62 | epapr_paravirt_enabled = true; |
@@ -70,3 +71,12 @@ int __init epapr_paravirt_early_init(void) | |||
70 | return 0; | 71 | return 0; |
71 | } | 72 | } |
72 | 73 | ||
74 | static int __init epapr_idle_init(void) | ||
75 | { | ||
76 | if (epapr_has_idle) | ||
77 | ppc_md.power_save = epapr_ev_idle; | ||
78 | |||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | postcore_initcall(epapr_idle_init); | ||