<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/smp.c, branch linux-2.6.25.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.25.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-06-09T18:26:58Z</updated>
<entry>
<title>POWERPC Bolt in SLB entry for kernel stack on secondary cpus</title>
<updated>2008-06-09T18:26:58Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2008-05-13T23:31:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77baabb259ede46ded3f9a85b446f37aaaa9edf8'/>
<id>urn:sha1:77baabb259ede46ded3f9a85b446f37aaaa9edf8</id>
<content type='text'>
This is upstream as commit 3b5750644b2ffa2a76fdfe7b4e00e4af2ecf3539.

This fixes a regression reported by Kamalesh Bulabel where a POWER4
machine would crash because of an SLB miss at a point where the SLB
miss exception was unrecoverable.  This regression is tracked at:

http://bugzilla.kernel.org/show_bug.cgi?id=10082

SLB misses at such points shouldn't happen because the kernel stack is
the only memory accessed other than things in the first segment of the
linear mapping (which is mapped at all times by entry 0 of the SLB).
The context switch code ensures that SLB entry 2 covers the kernel
stack, if it is not already covered by entry 0.  None of entries 0
to 2 are ever replaced by the SLB miss handler.

Where this went wrong is that the context switch code assumes it
doesn't have to write to SLB entry 2 if the new kernel stack is in the
same segment as the old kernel stack, since entry 2 should already be
correct.  However, when we start up a secondary cpu, it calls
slb_initialize, which doesn't set up entry 2.  This is correct for
the boot cpu, where we will be using a stack in the kernel BSS at this
point (i.e. init_thread_union), but not necessarily for secondary
cpus, whose initial stack can be allocated anywhere.  This doesn't
cause any immediate problem since the SLB miss handler will just
create an SLB entry somewhere else to cover the initial stack.

In fact it's possible for the cpu to go quite a long time without SLB
entry 2 being valid.  Eventually, though, the entry created by the SLB
miss handler will get overwritten by some other entry, and if the next
access to the stack is at an unrecoverable point, we get the crash.

This fixes the problem by making slb_initialize create a suitable
entry for the kernel stack, if we are on a secondary cpu and the stack
isn't covered by SLB entry 0.  This requires initializing the
get_paca()-&gt;kstack field earlier, so I do that in smp_create_idle
where the current field is initialized.  This also abstracts a bit of
the computation that mk_esid_data in slb.c does so that it can be used
in slb_initialize.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;

</content>
</entry>
<entry>
<title>[POWERPC] Make smp_send_stop() handle panic and xmon reboot</title>
<updated>2008-01-25T11:52:50Z</updated>
<author>
<name>Olof Johansson</name>
</author>
<published>2007-12-28T04:11:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e057d985fd8aad83d07376c5c36f2c8a6c5411be'/>
<id>urn:sha1:e057d985fd8aad83d07376c5c36f2c8a6c5411be</id>
<content type='text'>
smp_send_stop() will send an IPI to all other cpus to shut them down.
However, for the case of xmon-based reboots (as well as potentially some
panics), the other cpus are (or might be) spinning with interrupts off,
and won't take the IPI.

Current code will drop us into the debugger when the IPI fails, which
means we're in an infinite loop that we can't get out of without an
external reset of some sort.

Instead, make the smp_send_stop() IPI call path just print the warning
about being unable to send IPIs, but make it return so the rest of the
shutdown sequence can continue. It's not perfect, but the lesser of
two evils.

Also move the call_lock handling outside of smp_call_function_map so we
can avoid deadlocks in smp_send_stop().

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Make smp_call_function_map static</title>
<updated>2008-01-25T11:52:49Z</updated>
<author>
<name>Olof Johansson</name>
</author>
<published>2007-12-28T04:08:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b616de5ef928ac1914348ff6a42521ca6b83112e'/>
<id>urn:sha1:b616de5ef928ac1914348ff6a42521ca6b83112e</id>
<content type='text'>
smp_call_function_map should be static, and for consistency prepend it
with __ like other local helper functions in the same file.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>Convert cpu_sibling_map to be a per cpu variable</title>
<updated>2007-10-16T16:42:50Z</updated>
<author>
<name>Mike Travis</name>
</author>
<published>2007-10-16T08:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5a7430ddcdb598261d70f7eb1bf450b5be52085'/>
<id>urn:sha1:d5a7430ddcdb598261d70f7eb1bf450b5be52085</id>
<content type='text'>
Convert cpu_sibling_map from a static array sized by NR_CPUS to a per_cpu
variable.  This saves sizeof(cpumask_t) * NR unused cpus.  Access is mostly
from startup and CPU HOTPLUG functions.

Signed-off-by: Mike Travis &lt;travis@sgi.com&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: "Siddha, Suresh B" &lt;suresh.b.siddha@intel.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Implement clockevents driver for powerpc</title>
<updated>2007-10-03T05:44:34Z</updated>
<author>
<name>Tony Breeds</name>
</author>
<published>2007-09-21T03:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d831d0b83f205888f4be4dee0a074ad67ef809b3'/>
<id>urn:sha1:d831d0b83f205888f4be4dee0a074ad67ef809b3</id>
<content type='text'>
This registers a clock event structure for the decrementer and turns
on CONFIG_GENERIC_CLOCKEVENTS, which means that we now don't need
most of timer_interrupt(), since the work is done in generic code.
For secondary CPUs, their decrementer clockevent is registered when
the CPU comes up (the generic code automatically removes the
clockevent when the CPU goes down).

Signed-off-by: Tony Breeds &lt;tony@bakeyournoodle.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Avoid pointless WARN_ON(irqs_disabled()) from panic codepath</title>
<updated>2007-09-22T04:49:22Z</updated>
<author>
<name>Satyam Sharma</name>
</author>
<published>2007-09-17T23:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fd7675c092f79f240246c76728477ec4e7f7f09'/>
<id>urn:sha1:8fd7675c092f79f240246c76728477ec4e7f7f09</id>
<content type='text'>
&gt; ------------[ cut here ]------------
&gt; Badness at arch/powerpc/kernel/smp.c:202

comes when smp_call_function_map() has been called with irqs disabled,
which is illegal. However, there is a special case, the panic() codepath,
when we do not want to warn about this -- warning at that time is pointless
anyway, and only serves to scroll away the *real* cause of the panic and
distracts from the real bug.

* So let's extract the WARN_ON() from smp_call_function_map() into all its
  callers -- smp_call_function() and smp_call_function_single()

* Also, introduce another caller of smp_call_function_map(), namely
  __smp_call_function() (and make smp_call_function() a wrapper over this)
  which does *not* warn about disabled irqs

* Use this __smp_call_function() from the panic codepath's smp_send_stop()

We also end having to move code of smp_send_stop() below the definition
of __smp_call_function().

Signed-off-by: Satyam Sharma &lt;satyam@infradead.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Fix num_cpus calculation in smp_call_function_map()</title>
<updated>2007-08-03T09:36:00Z</updated>
<author>
<name>Kevin Corry</name>
</author>
<published>2007-07-31T20:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17aa3a82aa2173a22405f862c4444656f0494a3f'/>
<id>urn:sha1:17aa3a82aa2173a22405f862c4444656f0494a3f</id>
<content type='text'>
In smp_call_function_map(), num_cpus is set to the number of online
CPUs minus one.  However, if the CPU mask does not include all CPUs
(except the one we're running on), the routine will hang in the first
while() loop until the 8 second timeout occurs.

The num_cpus should be set to the number of CPUs specified in the mask
passed into the routine, after we've made any modifications to the
mask.  With this change, we can also get rid of the call to
cpus_empty() and avoid adding another pass through the bitmask.

Signed-off-by: Kevin Corry &lt;kevcorry@us.ibm.com&gt;
Signed-off-by: Carl Love &lt;carll@us.ibm.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Allow smp_call_function_single() to current cpu</title>
<updated>2007-07-22T11:30:58Z</updated>
<author>
<name>Avi Kivity</name>
</author>
<published>2007-07-19T15:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adff093d6c545c882f1503607f6af14ddd90bb89'/>
<id>urn:sha1:adff093d6c545c882f1503607f6af14ddd90bb89</id>
<content type='text'>
This removes the requirement for callers to get_cpu() to check in simple
cases.  i386 and x86_64 already received a similar treatment.

Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Fix smp_call_function to be preempt-safe</title>
<updated>2007-05-22T10:20:56Z</updated>
<author>
<name>Hugh Dickins</name>
</author>
<published>2007-05-18T16:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3fdaed9e973687f088c9c156a6e20870386e0b7'/>
<id>urn:sha1:d3fdaed9e973687f088c9c156a6e20870386e0b7</id>
<content type='text'>
smp_call_function_map() was not safe against preemption to another
cpu: its test for removing self from map was outside the spinlock.
Rearrange it a little to fix that.

smp_call_function_single() was also wrong: now get_cpu() before
excluding self, as other architectures do.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Add smp_call_function_map and smp_call_function_single</title>
<updated>2007-05-07T10:31:13Z</updated>
<author>
<name>will schmidt</name>
</author>
<published>2007-05-02T17:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44755d11a3c054adf7eb974a4720936563cf7dcf'/>
<id>urn:sha1:44755d11a3c054adf7eb974a4720936563cf7dcf</id>
<content type='text'>
Add a new function named smp_call_function_single().  This matches a generic
prototype from include/linux/smp.h.

Add a function smp_call_function_map().  This is, for the most part, a rename
of smp_call_function, with some added cpumask support.  smp_call_function and
smp_call_function_single call into smp_call_function_map.

Lightly tested on 970mp (blade), power4 and power5.

Signed-off-by: Will Schmidt &lt;will_schmidt@vnet.ibm.com&gt;
cc: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
</feed>
