From: venkatesh.pallipadi@intel.com
To: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, lenb@kernel.org,
shaohua.li@intel.com, svaidy@linux.vnet.ibm.com,
a.p.zijlstra@chello.nl,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs
Date: Fri, 22 May 2009 16:19:41 -0700 [thread overview]
Message-ID: <20090522232230.020301000@intel.com> (raw)
In-Reply-To: 20090522231940.553094000@intel.com
[-- Attachment #1: 0001-x86-Add-pm_play_dead-funcptr-to-power-efficiently-o.patch --]
[-- Type: text/plain, Size: 1411 bytes --]
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 <venkatesh.pallipadi@intel.com>
---
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
--
next prev parent reply other threads:[~2009-05-22 23:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 23:19 [patch 0/2] x86: Make offline cpus to go to deepest idle state using mwait venkatesh.pallipadi
2009-05-22 23:19 ` venkatesh.pallipadi [this message]
2009-05-23 10:44 ` [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs Peter Zijlstra
2009-05-23 15:07 ` Pallipadi, Venkatesh
2009-06-22 17:25 ` Pallipadi, Venkatesh
2009-05-22 23:19 ` [patch 2/2] x86: put offline CPUs into deepest mwait cstate_subcstate venkatesh.pallipadi
2009-05-25 0:56 ` Shaohua Li
2009-05-26 21:17 ` Pallipadi, Venkatesh
2010-09-17 23:46 ` [tip:x86/idle] x86, hotplug: Use mwait to offline a processor, fix the legacy case tip-bot for H. Peter Anvin
2010-09-18 0:13 ` [tip:x86/idle] x86, hotplug: Move WBINVD back outside the play_dead loop tip-bot for H. Peter Anvin
2010-09-18 0:48 ` Venkatesh Pallipadi
2010-09-20 18:20 ` H. Peter Anvin
2010-09-20 20:11 ` H. Peter Anvin
2010-09-20 22:34 ` Venkatesh Pallipadi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090522232230.020301000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.