From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/2] arm64: hw_breakpoint: convert CPU hotplug notifier to new infrastructure
Date: Fri, 26 Aug 2016 12:41:41 +0100 [thread overview]
Message-ID: <20160826114141.GI13554@arm.com> (raw)
In-Reply-To: <20160826112806.rr3apxva73frag5x@linutronix.de>
On Fri, Aug 26, 2016 at 01:28:06PM +0200, Sebastian Andrzej Siewior wrote:
> On 2016-08-26 11:35:57 [+0100], Will Deacon wrote:
> > diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
> > index 26a6bf77d272..948b73148d56 100644
> > --- a/arch/arm64/kernel/hw_breakpoint.c
> > +++ b/arch/arm64/kernel/hw_breakpoint.c
> > @@ -857,7 +857,7 @@ void hw_breakpoint_thread_switch(struct task_struct *next)
> ?
> > -static int hw_breakpoint_reset_notify(struct notifier_block *self,
> > - unsigned long action,
> > - void *hcpu)
> > -{
> > - if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) {
> > - local_irq_disable();
> > - hw_breakpoint_reset(NULL);
>
> so the old one was invoked at CPU_ONLINE time.
>
> > - local_irq_enable();
> > - }
> > - return NOTIFY_OK;
> > + return 0;
> > }
> ?
> > @@ -919,36 +905,34 @@ static inline void cpu_suspend_set_dbg_restorer(void (*hw_bp_restore)(void *))
> ?
> > + /*
> > + * Reset the breakpoint resources. We assume that a halting
> > + * debugger will leave the world in a nice state for us.
> > + */
> > + ret = cpuhp_setup_state(CPUHP_AP_PERF_ARM_HW_BREAKPOINT_STARTING,
> > + "CPUHP_AP_PERF_ARM_HW_BREAKPOINT_STARTING",
> > + hw_breakpoint_reset, NULL);
>
> But this will move it to CPU_STARTING. May I ask why?
It probably should be there anyway, since the current code is explicitly
disabling interrupts to mitigate being called with them enabled and debug
is something we want as early as possible.
Will
next prev parent reply other threads:[~2016-08-26 11:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 10:35 [RFC PATCH 1/2] arm64: hw_breakpoint: convert CPU hotplug notifier to new infrastructure Will Deacon
2016-08-26 10:35 ` [RFC PATCH 2/2] arm64: debug: convert OS lock " Will Deacon
2016-08-26 11:28 ` [RFC PATCH 1/2] arm64: hw_breakpoint: convert " Sebastian Andrzej Siewior
2016-08-26 11:41 ` Will Deacon [this message]
2016-08-31 16:04 ` Sebastian Andrzej Siewior
2016-08-31 16:50 ` Will Deacon
2016-08-31 15:35 ` Lorenzo Pieralisi
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=20160826114141.GI13554@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 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.