From: peterz@infradead.org
To: Sumit Garg <sumit.garg@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
linux-serial@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net,
Jiri Slaby <jslaby@suse.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Jason Wessel <jason.wessel@windriver.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC 1/5] tty/sysrq: Make sysrq handler NMI aware
Date: Fri, 14 Aug 2020 16:34:00 +0200 [thread overview]
Message-ID: <20200814143400.GB165568@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAFA6WYMy_+RdsPJekm7zmCrFUXHqjsfr3JvyD7L8A2X8+jB8Qw@mail.gmail.com>
On Fri, Aug 14, 2020 at 12:54:35PM +0530, Sumit Garg wrote:
> On Thu, 13 Aug 2020 at 05:30, Doug Anderson <dianders@chromium.org> wrote:
> > On Tue, Jul 21, 2020 at 5:10 AM Sumit Garg <sumit.garg@linaro.org> wrote:
> > Wishful thinking, but (as far as I can tell) irq_work_queue() only
> > queues work on the CPU running the NMI. I don't have lots of NMI
> > experience, but any chance there is a variant that will queue work on
> > any CPU? Then sysrq handlers that aren't NMI aware will be more
> > likely to work.
> >
>
> Unfortunately, queuing work on other CPUs isn't safe in NMI context,
> see this warning [1]. The comment mentions:
>
> /* Arch remote IPI send/receive backend aren't NMI safe */
>
> Peter,
>
> Can you throw some light here as to why it isn't considered NMI-safe
> to send remote IPI in NMI context? Is it an arch specific limitation?
Yeah, remote irq_work uses __smp_call_single_queue() /
send_call_function_single_ipi() which isn't safe to be used from NMI
context in general.
arch_irq_work_raise() is very carefully implemented on a number of
platforms to be able to (self) IPI from NMI context.
next prev parent reply other threads:[~2020-08-14 14:34 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 12:10 [RFC 0/5] Introduce NMI aware serial drivers Sumit Garg
2020-07-21 12:10 ` [RFC 1/5] tty/sysrq: Make sysrq handler NMI aware Sumit Garg
2020-08-12 23:59 ` Doug Anderson
2020-08-14 7:24 ` Sumit Garg
2020-08-14 14:34 ` peterz [this message]
2020-08-14 14:57 ` Doug Anderson
2020-08-17 14:08 ` Sumit Garg
2020-08-17 17:19 ` Doug Anderson
2020-08-18 13:30 ` Sumit Garg
2020-07-21 12:10 ` [RFC 2/5] serial: core: Add framework to allow NMI aware serial drivers Sumit Garg
2020-08-12 23:59 ` Doug Anderson
2020-08-13 14:19 ` Sumit Garg
2020-08-13 14:37 ` Doug Anderson
2020-08-14 11:17 ` Sumit Garg
2020-08-14 14:13 ` Daniel Thompson
2020-08-17 12:27 ` Sumit Garg
2020-08-17 13:57 ` Doug Anderson
2020-08-17 14:23 ` Sumit Garg
2020-08-17 14:32 ` Daniel Thompson
2020-08-18 13:18 ` Sumit Garg
2020-08-17 14:28 ` Daniel Thompson
2020-08-18 13:06 ` Sumit Garg
2020-08-14 14:43 ` Doug Anderson
2020-08-17 12:29 ` Sumit Garg
2020-07-21 12:10 ` [RFC 3/5] serial: amba-pl011: Re-order APIs definition Sumit Garg
2020-07-21 12:10 ` [RFC 4/5] serial: amba-pl011: Enable NMI aware uart port Sumit Garg
2020-08-12 23:59 ` Doug Anderson
2020-08-13 10:34 ` Sumit Garg
2020-07-21 12:10 ` [RFC 5/5] serial: Remove KGDB NMI serial driver Sumit Garg
2020-08-11 13:50 ` [RFC 0/5] Introduce NMI aware serial drivers Sumit Garg
2020-08-11 13:58 ` Greg Kroah-Hartman
2020-08-11 14:29 ` Sumit Garg
2020-08-11 14:58 ` Greg Kroah-Hartman
2020-08-11 17:15 ` Doug Anderson
2020-08-12 14:52 ` Sumit Garg
2020-08-12 15:27 ` Doug Anderson
2020-08-13 0:08 ` Doug Anderson
2020-08-13 9:25 ` Sumit Garg
2020-08-13 10:17 ` Daniel Thompson
2020-08-14 12:06 ` Sumit Garg
2020-08-14 14:18 ` Daniel Thompson
2020-08-17 5:12 ` Sumit Garg
2020-08-17 9:28 ` Daniel Thompson
2020-08-17 14:12 ` Sumit Garg
2020-08-13 15:26 ` Doug Anderson
2020-08-14 12:50 ` Sumit Garg
2020-08-12 5:48 ` Sumit Garg
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=20200814143400.GB165568@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=jslaby@suse.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=sumit.garg@linaro.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;
as well as URLs for NNTP newsgroup(s).