PPC: define the conditions where the ePAPR idle hcall can be supported
PATCH 1/1 PPC: define the conditions where the ePAPR idle hcall can be supported
From: Stuart Yoder <[email protected]>
For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c and epapr_hcalls.c which contains the 32-bit paravirt idle loop.
For 64-bit, the paravirt idle loop is in idle_book3e.S and that source file is included only if CONFIG_PPC_BOOK3E_64 defined.
This patch makes that dependency for 64-bit explicit.
--- arch/powerpc/kernel/epapr_paravirt.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/powerpc/kernel/epapr_paravirt.c +6 -0
@@ -23,8 +23,10 @@#include <asm/code-patching.h> #include <asm/machdep.h> +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )extern void epapr_ev_idle (void );extern u32 epapr_ev_idle_start[]; +#endif bool epapr_paravirt_enabled;
@@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)for (i =0 ; i < (len /4 ); i++) {patch_instruction (epapr_hypercall_start + i, insts[i]); +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )patch_instruction (epapr_ev_idle_start + i, insts[i]); +#endif } +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )if (of_get_property (hyper_node,"has-idle" ,NULL )) ppc_md.power_save = epapr_ev_idle; +#endif epapr_paravirt_enabled = true;
Signature · 1 line
1.7.9.7
Quoted 11 lines · Stuart Yoder
From: Stuart Yoder <[email protected]>
For 32-bit,
CONFIG_EPAPR_PARAVIRTpulls in bothepapr_paravirt.candepapr_hcalls.cwhich contains the 32-bit paravirt idle loop.For 64-bit, the paravirt idle loop is in
idle_book3e.Sand that source file is included only ifCONFIG_PPC_BOOK3E_64defined.This patch makes that dependency for 64-bit explicit.
Signed-off-by Stuart Yoder <[email protected]>
It works for me. Thanks.
Quoted 9 lines
--- arch/powerpc/kernel/epapr_paravirt.c | 6 ++++++ 1 file changed, 6 insertions(+)arch/powerpc/kernel/epapr_paravirt.c +0
-0
arch/powerpc/kernel/epapr_paravirt.c line 29
Quoted 7 lines
arch/powerpc/kernel/epapr_paravirt.c +2
-0@@ -23,8 +23,10 @@#include <asm/code-patching.h> #include <asm/machdep.h> +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )extern void epapr_ev_idle (void );extern u32 epapr_ev_idle_start[]; +#endif
You don't need this #ifdef
Quoted 23 lines
arch/powerpc/kernel/epapr_paravirt.c +4
-0bool epapr_paravirt_enabled;@@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)for (i =0 ; i < (len /4 ); i++) {patch_instruction (epapr_hypercall_start + i, insts[i]); +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )patch_instruction (epapr_ev_idle_start + i, insts[i]); +#endif } +#if !defined(CONFIG_64BIT ) || defined(CONFIG_PPC_BOOK3E_64 )if (of_get_property (hyper_node,"has-idle" ,NULL )) ppc_md.power_save = epapr_ev_idle; +#endif epapr_paravirt_enabled = true;Signature · 1 line
1.7.9.7