linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 0/3] AArch64: KGDB support
Date: Wed, 22 Jan 2014 10:31:40 +0000	[thread overview]
Message-ID: <20140122103140.GC1621@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CALicx6tn4SJ4BjDGBNwH_8dGt82yHeAVyLzP+97rb8FDJdZSYQ@mail.gmail.com>

On Wed, Jan 22, 2014 at 07:50:46AM +0000, Vijay Kilari wrote:
> On Wed, Jan 22, 2014 at 10:01 AM, Vijay Kilari <vijay.kilari@gmail.com> wrote:
> >>> On Mon, Jan 20, 2014 at 3:53 PM, Will Deacon <will.deacon@arm.com> wrote:
> >> That's a good point: I think we wait until our first exception before they
> >> are unmasked. Perhaps we should:
> >>
> >>  (1) Move local_dbg_{save,restore} from debug-monitors.h into irqflags.h
> 
> local_dbg_save is setting bit #8 it should be bit #9?
> 
> #define local_dbg_save(flags)
>          \
>         do {
>          \
>                 typecheck(unsigned long, flags);
>          \
>                 asm volatile(
>          \
>                 "mrs    %0, daif                        //
> local_dbg_save\n"    \
>                 "msr    daifset, #8"

That uses daifset, so #8 is bit 3 which is D.

> >>  (2) Add local_dbg_enable/local_dbg_disable macros
> >>  (3) Add a call to local_dbg_enable in the clear_os_lock function after the
> >>      isb().
> >>
> >> Does that work for you?
> >
> > Yes, only after first exception occurs the PSTATE.D is unmasked.
> >
> > I have patched (temp) as below and now KGDB boot tests pass
> >
> > diff --git a/arch/arm64/include/asm/debug-monitors.h
> > b/arch/arm64/include/asm/debug-monitors.h
> > index aff3a76..ea2bc46 100644
> > --- a/arch/arm64/include/asm/debug-monitors.h
> > +++ b/arch/arm64/include/asm/debug-monitors.h
> > @@ -64,6 +111,24 @@ struct task_struct;
> >
> >  #define DBG_ARCH_ID_RESERVED   0       /* In case of ptrace ABI updates. */
> >
> > +#define local_dbg_enable()
> >          \
> > +       do {
> >          \
> > +               asm volatile(
> >          \
> > +               "msr    daifclr, #9             //

I think this is going to unmask fiq as well...

Will

  reply	other threads:[~2014-01-22 10:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 11:50 [PATCH v6 0/3] AArch64: KGDB support vijay.kilari at gmail.com
2013-12-19 11:50 ` [PATCH v6 1/3] AArch64: KGDB: Add Basic " vijay.kilari at gmail.com
2014-01-16 13:47   ` Catalin Marinas
2013-12-19 11:50 ` [PATCH v6 2/3] AArch64: KGDB: Add step debugging support vijay.kilari at gmail.com
2013-12-19 11:50 ` [PATCH v6 3/3] KGDB: make kgdb_breakpoint() as noinline vijay.kilari at gmail.com
2014-01-15 16:44   ` Jason Wessel
2014-01-15 16:48     ` Will Deacon
2014-01-06 18:12 ` [PATCH v6 0/3] AArch64: KGDB support Will Deacon
2014-01-07 12:11   ` Catalin Marinas
2014-01-15 10:17     ` Vijay Kilari
2014-01-15 23:31   ` Andrew Pinski
2014-01-16 13:45 ` Catalin Marinas
2014-01-18  8:02   ` Vijay Kilari
2014-01-20 10:23     ` Will Deacon
     [not found]       ` <CALicx6v-pxOxdx4Q+a_Rx4XdHPXvgbVoYuouJoBxRdENMzCvAA@mail.gmail.com>
     [not found]         ` <20140121183604.GQ30706@mudshark.cambridge.arm.com>
2014-01-22  4:31           ` Vijay Kilari
2014-01-22  7:50             ` Vijay Kilari
2014-01-22 10:31               ` Will Deacon [this message]
2014-01-22 14:54     ` Vijay Kilari

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=20140122103140.GC1621@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@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 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).