Re: [PATCH V5 04/25] perf/x86/intel: Hybrid PMU support for perf capabilities

From: Peter Zijlstra
Date: Thu Apr 08 2021 - 12:47:44 EST


On Thu, Apr 08, 2021 at 03:40:56PM +0200, Peter Zijlstra wrote:
> On Mon, Apr 05, 2021 at 08:10:46AM -0700, kan.liang@xxxxxxxxxxxxxxx wrote:
> > +static inline bool intel_pmu_has_cap(struct perf_event *event, int idx)
> > +{
> > + union perf_capabilities *intel_cap;
> > +
> > + intel_cap = is_hybrid() ? &hybrid_pmu(event->pmu)->intel_cap :
> > + &x86_pmu.intel_cap;
>
> This isn't:
>
> intel_cap = &hybrid_pmu(event->pmu)->intel_cap;

Ah no, its because you want a pointer and GCC is being silly about that.

I have something for that, hold on ;-)