lkml.org 
[lkml]   [2017]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v6 07/11] drivers: perf: hisi: Add support for Hisilicon SoC event counters
    From
    Date


    On Tuesday 21 March 2017 10:22 PM, Mark Rutland wrote:
    > +static int hisi_hw_perf_event_init(struct perf_event *event)
    > >+{
    > >+ struct hw_perf_event *hwc = &event->hw;
    > >+ struct hisi_pmu *hisi_pmu = to_hisi_pmu(event->pmu);
    > >+ struct device *dev = hisi_pmu->dev;
    >> +
    >> >+ /*
    >> >+ * We must NOT create groups containing mixed PMUs, although
    >> >+ * software events are acceptable
    >> >+ */
    >> >+ if (event->group_leader->pmu != event->pmu &&
    >> >+ !is_software_event(event->group_leader))
    >> >+ return -EINVAL;
    >> >+
    >> >+ list_for_each_entry(sibling, &event->group_leader->sibling_list,
    >> >+ group_entry)
    >> >+ if (sibling->pmu != event->pmu && !is_software_event(sibling))
    >> >+ return -EINVAL;
    > Please also check the number of counters.

    Sorry, I could not follow this comment correctly. Could you please explain ?
    I check the available counters and update used mask in pmu_add -->
    get_event_index

    Thanks,
    Anurup

    > [...]
    >

    \
     
     \ /
      Last update: 2017-03-30 11:50    [W:2.702 / U:1.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site