Add a funcptr pm_play_dead (similar to pm_idle) that can take the offline CPUs to the most power efficient idle state. This patch just adds the func pointer. The pointer will get initialized by patch that follows. Signed-off-by: Venkatesh Pallipadi --- arch/x86/include/asm/smp.h | 2 ++ arch/x86/kernel/smpboot.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 19e0d88..0388b81 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h @@ -148,6 +148,8 @@ static inline int num_booting_cpus(void) { return cpumask_weight(cpu_callout_mask); } + +extern void (*pm_play_dead)(void); #endif /* CONFIG_SMP */ extern unsigned disabled_cpus __cpuinitdata; diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 58d24ef..4f8af6a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1195,6 +1195,8 @@ __init void prefill_possible_map(void) nr_cpu_ids = possible; } +void (*pm_play_dead)(void) = NULL; + #ifdef CONFIG_HOTPLUG_CPU static void remove_siblinginfo(int cpu) @@ -1313,7 +1315,10 @@ void play_dead_common(void) void native_play_dead(void) { play_dead_common(); - wbinvd_halt(); + if (pm_play_dead) + pm_play_dead(); + else + wbinvd_halt(); } #else /* ... !CONFIG_HOTPLUG_CPU */ -- 1.6.0.6 -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/