From: Jiri Slaby <jslaby@suse.cz>
To: Jibin Xu <jibin.xu@windriver.com>, gregkh@linuxfoundation.org
Cc: rmk+kernel@armlinux.org.uk, mingo@elte.hu,
linux-arm-kernel@lists.infradead.org, riel@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysrq : fix Show Regs call trace on ARM
Date: Wed, 13 Sep 2017 08:14:30 +0200 [thread overview]
Message-ID: <58805d5d-b520-c27f-b4c6-633d897d90cc@suse.cz> (raw)
In-Reply-To: <ac1a099b-2e7e-8001-24a2-679a0b7077a5@suse.cz>
On 09/13/2017, 08:04 AM, Jiri Slaby wrote:
> On 09/11/2017, 01:22 PM, Jibin Xu wrote:
>> Hi,Jiri:
>>
>> I tested get_irq_regs() behave in the softirq context,
>> I called get_irq_regs() by a tasklet, It returns NULL.My understanding is get_irq_regs() can return the right result
>> only in hardware IRQ,otherwise it returns NULL.
>> So I think in_irq() would be better.
>
> Hi,
>
> tasklets are run in the process context (in a kthread). But what about
> timers? HARDIRQ is decremented, SOFTIRQ remains set and sysrq handlers
> are called in such conditions (in_interrupt() is true, in_irq() is
> false). At that moment, irq_regs are still set and valid IMO.
>
> But I would believe for now that sysrq handlers are not invoked from
> softirq context. AFAIK they are called only from hardirq (serial port or
> keyboard IRQ handler) or process context (write to /proc/sysrq-trigger).
> So this change *should* be safe unless someone else objects there are
> some kgdb special cases or something.
Oops, serial8250_timeout actually can do so. So yes, sysrq handlers can
be invoked from softirq (timer) context and they still should print the
registers at best.
I have to leave now, will look into it later if someone (you :)) doesn't
beat me to it.
thanks,
--
js
suse labs
prev parent reply other threads:[~2017-09-13 6:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 3:11 Jibin Xu
2017-09-11 5:24 ` Jiri Slaby
2017-09-11 9:55 ` Jibin Xu
[not found] ` <17da8267-c4aa-dc0f-1150-4fd5efe0073c@windriver.com>
2017-09-13 6:04 ` Jiri Slaby
2017-09-13 6:14 ` Jiri Slaby [this message]
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=58805d5d-b520-c27f-b4c6-633d897d90cc@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=jibin.xu@windriver.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=riel@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®