summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/smp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-25 14:53:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-25 14:53:55 -0700
commit06367d58f487a592de50e6e2327371c5e3b6188f (patch)
tree4f9ced9a089d6f1a30be01d798cd981f1a9ba059 /arch/powerpc/platforms/pseries/smp.c
parent654fdd041227d7de1594baa61c58f2c87bd0640f (diff)
parentdbe78b40118636f2d5d276144239dd4bfd5f04f9 (diff)
downloadlinux-06367d58f487a592de50e6e2327371c5e3b6188f.tar.bz2
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Ben Herrenschmidt: "Here are a few things for -rc2, this time it's all written by me so it can only be perfect .... right ? :) So we have the fix to call irq_enter/exit on the irq stack we've been discussing, plus a cleanup on top to remove an unused (and broken) stack limit tracking feature (well, make it 32-bit only in fact where it is used and works properly). Then we have two things that I wrote over the last couple of days and made the executive decision to include just because I can (and I'm sure you won't object .... right ?). They fix a couple of annoying and long standing "issues": - We had separate zImages for when booting via Open Firmware vs. booting via a flat device-tree, while it's trivial to make one that deals with both - We wasted a ton of cycles spinning secondary CPUs uselessly at boot instead of starting them when needed on pseries, thus contributing significantly to global warming" * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/pseries: Do not start secondaries in Open Firmware powerpc/zImage: make the "OF" wrapper support ePAPR boot powerpc: Remove ksp_limit on ppc64 powerpc/irq: Run softirqs off the top of the irq stack
Diffstat (limited to 'arch/powerpc/platforms/pseries/smp.c')
-rw-r--r--arch/powerpc/platforms/pseries/smp.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 1c1771a40250..24f58cb0a543 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -233,18 +233,24 @@ static void __init smp_init_pseries(void)
alloc_bootmem_cpumask_var(&of_spin_mask);
- /* Mark threads which are still spinning in hold loops. */
- if (cpu_has_feature(CPU_FTR_SMT)) {
- for_each_present_cpu(i) {
- if (cpu_thread_in_core(i) == 0)
- cpumask_set_cpu(i, of_spin_mask);
- }
- } else {
- cpumask_copy(of_spin_mask, cpu_present_mask);
+ /*
+ * Mark threads which are still spinning in hold loops
+ *
+ * We know prom_init will not have started them if RTAS supports
+ * query-cpu-stopped-state.
+ */
+ if (rtas_token("query-cpu-stopped-state") == RTAS_UNKNOWN_SERVICE) {
+ if (cpu_has_feature(CPU_FTR_SMT)) {
+ for_each_present_cpu(i) {
+ if (cpu_thread_in_core(i) == 0)
+ cpumask_set_cpu(i, of_spin_mask);
+ }
+ } else
+ cpumask_copy(of_spin_mask, cpu_present_mask);
+
+ cpumask_clear_cpu(boot_cpuid, of_spin_mask);
}
- cpumask_clear_cpu(boot_cpuid, of_spin_mask);
-
/* Non-lpar has additional take/give timebase */
if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) {
smp_ops->give_timebase = rtas_give_timebase;