lkml.org 
[lkml]   [2016]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf powerpc: Don't call perf_event_disable from atomic context
On Tue, Oct 04, 2016 at 03:29:33PM +1100, Michael Ellerman wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
> > So it would be good to also explain why PPC needs this in the first
> > place.
>
> Unfortunately I don't really know the code, and the original author is AWOL.
>
> But AFAICS perf_event_disable() is only called here:
>
> if (!stepped) {
> WARN(1, "Unable to handle hardware breakpoint. Breakpoint at "
> "0x%lx will be disabled.", info->address);
> perf_event_disable(bp);
> goto out;
> }
>
> Which is where we cope with the possibility that we couldn't emulate the
> instruction that hit the breakpoint. Seems that is not an issue on x86,
> or it's handled elsewhere?

I don't think x86 ever needs to emulate things on hw breakpoint
(although I could be mistaken), but I would expect ARM to maybe need
so, and I couldn't find a disable there either.

Will?

> We should fix emulate_step() if it failed to emulate something it
> should have, but there will always be the possibility that it fails.
>
> Instead of calling perf_event_disable() we could just add a flag to
> arch_hw_breakpoint that says we hit an error on the event, and block
> reinstalling it in arch_install_hw_breakpoint().

Possible..

\
 
 \ /
  Last update: 2016-10-04 09:07    [W:0.083 / U:2.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site