Skip to content

Commit 55e0a2f

Browse files
Junhao HeSuzuki K Poulose
authored andcommitted
hwtracing: hisi_ptt: Add dummy callback pmu::read()
When start trace with perf option "-C $cpu" and immediately stop it with SIGTERM or others, the perf core will invoke pmu::read() while the driver doesn't implement it. Add a dummy pmu::read() to avoid any issues. Fixes: ff0de06 ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device") Signed-off-by: Junhao He <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 287e82c commit 55e0a2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/hwtracing/ptt/hisi_ptt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,10 @@ static void hisi_ptt_pmu_del(struct perf_event *event, int flags)
11781178
hisi_ptt_pmu_stop(event, PERF_EF_UPDATE);
11791179
}
11801180

1181+
static void hisi_ptt_pmu_read(struct perf_event *event)
1182+
{
1183+
}
1184+
11811185
static void hisi_ptt_remove_cpuhp_instance(void *hotplug_node)
11821186
{
11831187
cpuhp_state_remove_instance_nocalls(hisi_ptt_pmu_online, hotplug_node);
@@ -1221,6 +1225,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt)
12211225
.stop = hisi_ptt_pmu_stop,
12221226
.add = hisi_ptt_pmu_add,
12231227
.del = hisi_ptt_pmu_del,
1228+
.read = hisi_ptt_pmu_read,
12241229
};
12251230

12261231
reg = readl(hisi_ptt->iobase + HISI_PTT_LOCATION);

0 commit comments

Comments
 (0)