public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: linux-kernel@vger.kernel.org, Russ.Dill@ti.com, mporter@ti.com,
	stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] [ARM] Unconditional call to smp_cross_call on UP crashes
Date: Thu, 24 May 2012 18:15:24 +0100	[thread overview]
Message-ID: <20120524171524.GG6908@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <F138E222-D587-4264-8B80-E041D44BF770@antoniou-consulting.com>

On Thu, May 24, 2012 at 07:55:56PM +0300, Pantelis Antoniou wrote:
> Hi Russell,
> 
> On May 24, 2012, at 7:17 PM, Russell King - ARM Linux wrote:
> 
> > On Thu, May 24, 2012 at 07:50:24PM +0000, Pantelis Antoniou wrote:
> >> omap2plus_defconfig builds with SMP & SMP_ON_UP set.
> >> On beagle (which is UP) is_smp() returns false and we don't call
> >> smp_init_cpus which in turn does not initialize smp_cross_call which
> >> remains NULL.
> >> 
> >> When issuing a reboot we OOPS with a NULL dereference on stop smp_call.
> > 
> > I've been wondering whether we should make smp_cross_call() a no-op instead
> > by default, rather than a NULL pointer.
> > 
> > Alternatively, if may be well worth changing this to do:
> > 
> > 	if (!cpumask_empty(&mask))
> > 		smp_cross_call(&mask, IPI_CPU_STOP);
> > 
> > instead, so we avoid calling smp_cross_call() when we're on a SMP system
> > with only one CPU online.  I like this approach better because it removes
> > a potential call into platform code which is inappropriate.
> 
> Both of these can work, and in fact have been tried.
> 
> I am partial on both to be honest. Have a default no-op function for smp_cross_call()
> and guard with cpumask_empty().
> 
> Which do you want me to make a patch for?

I think the cpumask_empty() is the best approach, thanks.

  reply	other threads:[~2012-05-24 17:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 19:50 [PATCH] [ARM] Unconditional call to smp_cross_call on UP crashes Pantelis Antoniou
2012-05-24 16:17 ` Russell King - ARM Linux
2012-05-24 16:55   ` Pantelis Antoniou
2012-05-24 17:15     ` Russell King - ARM Linux [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-24 19:38 Pantelis Antoniou
2012-05-24 17:09 Pantelis Antoniou
2012-05-23 17:45 ` Russ Dill
2012-05-23 18:52 ` Russell King - ARM Linux
2012-05-23 19:17   ` Russell King - ARM Linux
2012-05-23 18:55 ` Porter, Matt

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=20120524171524.GG6908@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Russ.Dill@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@ti.com \
    --cc=panto@antoniou-consulting.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox