Unverified Commit 0ecacc94 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

Merge Pull Request from: @hejunhao3 
 
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. 
 
Link:https://gitee.com/openeuler/kernel/pulls/1045

 

Reviewed-by: default avatarYang Shen <shenyang39@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents f164cfcc 8ee6f013
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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));
}