All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Atish Patra <atish.patra@wdc.com>
Cc: "linux-riscv@lists.infradead.org" <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] riscv: don't stop itself in smp_send_stop
Date: Mon, 10 Dec 2018 11:58:12 +0100	[thread overview]
Message-ID: <mvmsgz5bqd7.fsf@suse.de> (raw)
In-Reply-To: <72991c58-91f5-abb1-54f9-35ae4533a26e@wdc.com> (Atish Patra's message of "Thu, 29 Nov 2018 10:52:40 -0800")

On Nov 29 2018, Atish Patra <atish.patra@wdc.com> wrote:

>> +	cpumask_copy (&mask, cpu_online_mask);
>> +	cpumask_clear_cpu (smp_processor_id (), &mask);
>> +	on_each_cpu_mask(&mask, ipi_stop, NULL, 0);
>
> The function header of on_each_cpu_mask says func should be
> non-blocking. Not sure if that's a hard requirement or not.

What does that mean?

>> +
>> +	/* Wait up to one second for other CPUs to stop */
>> +	timeout = USEC_PER_SEC;
>> +	while (num_online_cpus() > 1 && timeout--)
>> +		udelay(1);
>> +
>> +	if (num_online_cpus() > 1)
>> +		pr_warn("SMP: failed to stop secondary CPUs\n");
>
> May be print the remaining online cpus so that we know which one failed ?

I have copied that from arm.  The only user of smp_send_stop is panic,
which can cope with that, and the probability of that happening is very
low anyway.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2018-12-10 10:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 16:32 [PATCH] riscv: don't stop itself in smp_send_stop Andreas Schwab
2018-11-29 18:52 ` Atish Patra
2018-12-10 10:58   ` Andreas Schwab [this message]
2018-12-11  0:06     ` Atish Patra
2018-12-11 10:20     ` [PATCH v2] " Andreas Schwab
2018-12-13 23:27       ` Atish Patra
2019-01-03 19:22         ` Palmer Dabbelt

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=mvmsgz5bqd7.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=atish.patra@wdc.com \
    --cc=linux-riscv@lists.infradead.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 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.