From: james.morse@arm•com (James Morse)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] arm64: mm: Add trace_irqflags annotations to do_debug_exception()
Date: Wed, 13 Apr 2016 13:37:46 +0100 [thread overview]
Message-ID: <570E3D9A.4090402@arm.com> (raw)
In-Reply-To: <20160329150650.GE6745@arm.com>
On 29/03/16 16:06, Will Deacon wrote:
> On Mon, Mar 21, 2016 at 05:14:06PM +0000, James Morse wrote:
>> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
>> index 44e56de23f79..d8b9c1da2630 100644
>> --- a/arch/arm64/mm/fault.c
>> +++ b/arch/arm64/mm/fault.c
>> @@ -548,20 +548,33 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
>> {
>> const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
>> struct siginfo info;
>> + int rv;
>>
>> - if (!inf->fn(addr, esr, regs))
>> - return 1;
>> + /*
>> + * If we came in from el0_dbg, we disabled irqs. From el1_dbg,
>> + * we need to test pstate.
>> + */
>> + if (user_mode(regs) || !(regs->pstate & PSR_I_BIT))
>> + trace_hardirqs_off();
>
> Can you use interrupts_enabled(regs) for this?
Yes! That would be better. I can also remove the user_mode() check which was due
to paranoia and miss-understanding.
Thanks,
James
prev parent reply other threads:[~2016-04-13 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 17:14 [PATCH] arm64: mm: Add trace_irqflags annotations to do_debug_exception() James Morse
2016-03-29 15:06 ` Will Deacon
2016-04-13 12:37 ` James Morse [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=570E3D9A.4090402@arm.com \
--to=james.morse@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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