mirror of https://github.com/torvalds/linux.git
perf/arm_cspmu: Add callback to reset filter config
Implementer may need to reset a filter config when stopping a counter, thus adding a callback for this. Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
c3d78c34ad
commit
a2573bc790
|
|
@ -815,6 +815,10 @@ static void arm_cspmu_stop(struct perf_event *event, int pmu_flags)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
arm_cspmu_disable_counter(cspmu, hwc->idx);
|
arm_cspmu_disable_counter(cspmu, hwc->idx);
|
||||||
|
|
||||||
|
if (cspmu->impl.ops.reset_ev_filter)
|
||||||
|
cspmu->impl.ops.reset_ev_filter(cspmu, event);
|
||||||
|
|
||||||
arm_cspmu_event_update(event);
|
arm_cspmu_event_update(event);
|
||||||
|
|
||||||
hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
|
hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,13 @@ struct arm_cspmu_impl_ops {
|
||||||
bool (*is_cycle_counter_event)(const struct perf_event *event);
|
bool (*is_cycle_counter_event)(const struct perf_event *event);
|
||||||
/* Decode event type/id from configs */
|
/* Decode event type/id from configs */
|
||||||
u32 (*event_type)(const struct perf_event *event);
|
u32 (*event_type)(const struct perf_event *event);
|
||||||
/* Set event filters */
|
/* Set/reset event filters */
|
||||||
void (*set_cc_filter)(struct arm_cspmu *cspmu,
|
void (*set_cc_filter)(struct arm_cspmu *cspmu,
|
||||||
const struct perf_event *event);
|
const struct perf_event *event);
|
||||||
void (*set_ev_filter)(struct arm_cspmu *cspmu,
|
void (*set_ev_filter)(struct arm_cspmu *cspmu,
|
||||||
const struct perf_event *event);
|
const struct perf_event *event);
|
||||||
|
void (*reset_ev_filter)(struct arm_cspmu *cspmu,
|
||||||
|
const struct perf_event *event);
|
||||||
/* Implementation specific event validation */
|
/* Implementation specific event validation */
|
||||||
int (*validate_event)(struct arm_cspmu *cspmu,
|
int (*validate_event)(struct arm_cspmu *cspmu,
|
||||||
struct perf_event *event);
|
struct perf_event *event);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue