Thread (16 messages) 16 messages, 6 authors, 2012-07-30
STALE5081d REVIEWED: 1 (0M)

[PATCH 1/1 v2] ARM: only call smp_send_stop() on SMP

From: Will Deacon <hidden>
Date: 2012-07-28 12:11:03
Also in: linux-omap

On Sat, Jul 28, 2012 at 11:08:31AM +0100, Russell King - ARM Linux wrote:
On Fri, Jul 27, 2012 at 10:40:24PM +0100, Will Deacon wrote:
quoted
On Fri, Jul 27, 2012 at 10:06:37PM +0100, Russell King - ARM Linux wrote:
quoted
We support booting a kernel on systems with or without SMP support, even
with a SMP kernel.  When the kernel is booted on such a system, it is
undefined whether smp_cross_call() is a valid function pointer.
So let's define it to point at a dummy function which explodes with a BUG if
the cpumask passed in isn't empty. That allows SMP kernels to do things like
`cross call to all other cores' without having to worry about whether there
are any other cores or not.
We should not be even attempting to do any cross calls when there aren't
any other CPUs in the system - that's rather the point of leaving it as
a NULL pointer so it does explode on such systems.

. the scheduler won't call smp_send_reschedule() when there are no other
  CPUs in the system.
. timer ticks won't be broadcast to other CPUs if there are no other CPUs
  in the system.
. function calls will not be issued to other CPUs if there are no other
  CPUs in the system.

There is only one case where this doesn't happen, and that's the shutdown
path.
Ok, that's a pretty compelling argument you've got there :)
For instance, smp_call_function*() all check that the target CPUs are
marked online before the arch code is requested to issue an IPI to the
target CPU.
Yes, thanks for making the case for the original patch. Consistency is the
most important thing with these APIs, so I'll go full circle and offer my
ack for the original patch:

Acked-by: Will Deacon <redacted>

The next question is: who's putting this into the patch system?

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help