lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 03/13] perf/x86/amd: add AMD Fam19h Branch Sampling support
On Fri, Nov 12, 2021 at 8:02 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Thu, Nov 11, 2021 at 12:44:05AM -0800, Stephane Eranian wrote:
> > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> > index 38b2c779146f..28559557f966 100644
> > --- a/arch/x86/events/core.c
> > +++ b/arch/x86/events/core.c
> > @@ -683,11 +683,16 @@ void x86_pmu_disable_all(void)
> >
> > if (!test_bit(idx, cpuc->active_mask))
> > continue;
> > +
> > + if (is_amd_brs(hwc))
> > + amd_brs_disable();
> > +
> > rdmsrl(x86_pmu_config_addr(idx), val);
> > if (!(val & ARCH_PERFMON_EVENTSEL_ENABLE))
> > continue;
> > val &= ~ARCH_PERFMON_EVENTSEL_ENABLE;
> > wrmsrl(x86_pmu_config_addr(idx), val);
> > +
> > if (is_counter_pair(hwc))
> > wrmsrl(x86_pmu_config_addr(idx + 1), 0);
> > }
>
> Please, stick that in amd_pmu_disable_all().


If I do that, I need to add a for_each_counter() loop to
amd_pmu_disable_all() but it does not have one call systematically.
If you are okay with it, then I am fine as well.

\
 
 \ /
  Last update: 2021-11-16 08:48    [W:0.097 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site