提交 8ee6f013 编写于 作者: J Junhao He 提交者: Ma Wupeng

perf: hisi: delete global enable pmu from xxx_write_counter()

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7C2U9
CVE: NA

----------------------------------------------------------------------

UC PMU global enable register be setup in pmu callback pmu::enable(),
which also be will setup in pmu::start()->xxx_write_counter(). And it
will start statistical information when callback pmu:start() return,
not is pmu:enable() return. Therefore the driver counter counts more
data than normal.

Fixes: 5ed05cb2 ("drivers/perf: hisi: Add support for HiSilicon UC PMU driver")
Signed-off-by: NJunhao He <hejunhao3@huawei.com>
上级 500214f8
......@@ -292,7 +292,6 @@ static u64 hisi_uc_pmu_read_counter(struct hisi_pmu *uc_pmu,
static void hisi_uc_pmu_write_counter(struct hisi_pmu *uc_pmu,
struct hw_perf_event *hwc, u64 val)
{
hisi_uc_pmu_start_counters(uc_pmu);
writeq(val, uc_pmu->base + HISI_UC_CNTR_REG(hwc->idx));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册