All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 1/6] arm64: Add macros to manage processor debug state
Date: Thu, 20 Feb 2014 16:27:10 +0000	[thread overview]
Message-ID: <20140220162710.GA7651@arm.com> (raw)
In-Reply-To: <20140220155600.GJ3615@mudshark.cambridge.arm.com>

On Thu, Feb 20, 2014 at 03:56:00PM +0000, Will Deacon wrote:
> On Thu, Feb 20, 2014 at 12:22:14PM +0000, Vijay Kilari wrote:
> > On Thu, Feb 20, 2014 at 5:12 PM, Will Deacon <will.deacon@arm.com> wrote:
> > > On Thu, Feb 20, 2014 at 06:58:25AM +0000, Vijay Kilari wrote:
> > >> --- a/arch/arm64/kernel/smp.c
> > >> +++ b/arch/arm64/kernel/smp.c
> > >> @@ -160,6 +160,8 @@ asmlinkage void secondary_start_kernel(void)
> > >>         set_cpu_online(cpu, true);
> > >>         complete(&cpu_running);
> > >>
> > >> +       local_dbg_enable();
> > >>         local_irq_enable();
> > >>         local_async_enable();
> > >
> > > The only thing to add then moving the isb(); local_dbg_enable() out of
> > > clear_os_lock and into debug_monitors_init. You can probably make the
> > > smp_call_function an on_each_cpu too.
> > >
> > > Does that make sense?
> > 
> > Its ok for me.  Isn't require to have isb() after clearing os lock for
> > every cpu?
> > Just having isb on cpu0 after clearing os lock is enough?
> 
> They'll synchronise on return from the IPI.
> 
> > --- a/arch/arm64/kernel/debug-monitors.c
> > +++ b/arch/arm64/kernel/debug-monitors.c
> > @@ -137,8 +137,6 @@ void disable_debug_monitors(enum debug_el el)
> >  static void clear_os_lock(void *unused)
> >  {
> >         asm volatile("msr oslar_el1, %0" : : "r" (0));
> > -       isb();
> > -       local_dbg_enable();
> >  }
> > 
> >  static int os_lock_notify(struct notifier_block *self,
> > @@ -157,8 +155,9 @@ static struct notifier_block os_lock_nb = {
> >  static int debug_monitors_init(void)
> >  {
> >         /* Clear the OS lock. */
> > -       smp_call_function(clear_os_lock, NULL, 1);
> > -       clear_os_lock(NULL);
> > +       on_each_cpu(clear_os_lock, NULL, 1);
> > +       isb();
> > +       local_dbg_enable();
> > 
> >         /* Register hotplug handler. */
> >         register_cpu_notifier(&os_lock_nb);
> > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> > index 7cfb92a..5070dc3 100644
> > --- a/arch/arm64/kernel/smp.c
> > +++ b/arch/arm64/kernel/smp.c
> > @@ -160,6 +160,7 @@ asmlinkage void secondary_start_kernel(void)
> >         set_cpu_online(cpu, true);
> >         complete(&cpu_running);
> > 
> > +       local_dbg_enable();
> >         local_irq_enable();
> >         local_async_enable();
> > 
> > Is this ok?
> 
> Looks good to me:
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>

Vijay, could you please post a commit log together with the above patch
(and Will's ack) so that I can merge it on top of your other patches?

Thanks.

-- 
Catalin

  reply	other threads:[~2014-02-20 16:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 11:20 [PATCH v9 0/6] arm64: KGDB Support vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 1/6] arm64: Add macros to manage processor debug state vijay.kilari at gmail.com
2014-01-29 10:55   ` Will Deacon
2014-02-17 12:21     ` Vijay Kilari
2014-02-17 13:01       ` Catalin Marinas
2014-02-18 11:29         ` Vijay Kilari
2014-02-18 12:02           ` Catalin Marinas
2014-02-19  4:44             ` Vijay Kilari
2014-02-19 11:31               ` Catalin Marinas
2014-02-19 16:03                 ` Catalin Marinas
2014-02-19 16:12                   ` Will Deacon
2014-02-20  6:58                     ` Vijay Kilari
2014-02-20 11:42                       ` Will Deacon
2014-02-20 12:22                         ` Vijay Kilari
2014-02-20 15:56                           ` Will Deacon
2014-02-20 16:27                             ` Catalin Marinas [this message]
2014-02-21  5:19                               ` Vijay Kilari
2014-02-20 11:52                       ` Catalin Marinas
2014-01-28 11:20 ` [PATCH v9 2/6] arm64: KGDB: Add Basic KGDB support vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 3/6] arm64: KGDB: Add step debugging support vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 4/6] KGDB: make kgdb_breakpoint() as noinline vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 5/6] misc: debug: remove compilation warnings vijay.kilari at gmail.com
2014-01-28 11:20 ` [PATCH v9 6/6] arm64: KGDB: Add KGDB config vijay.kilari at gmail.com

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=20140220162710.GA7651@arm.com \
    --to=catalin.marinas@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 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.