Unverified Commit 549f97e6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4654 hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init()

Merge Pull Request from: @lujunhuaHW 
 
The driver finishes a write cycle by read the fifo tx full status
or write limit decrease to 0. The driver starts to write data to
the FIFO after the I2C FIFO almost empty interrupt is reported.
The threshold for FIFO almost empty interrupt is that the amount
of data in the FIFO is less than or equal to 1.
Reduce write maxwrite to the fifo depth - aempty interrupt
threshold. Limiting the number of data to be written at a time
to remaining fifo capacity.

bugzilla: https://gitee.com/openeuler/kernel/issues/I92NZO 
 
Link:https://gitee.com/openeuler/kernel/pulls/4654

 

Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 0e6ac87d 9d8c4637
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -995,14 +995,14 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
	int ret;
	u32 val;

	if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
		return -ENOENT;

	if (event->cpu < 0) {
		dev_dbg(event->pmu->dev, "Per-task mode not supported\n");
		return -EOPNOTSUPP;
	}

	if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
		return -ENOENT;

	ret = hisi_ptt_trace_valid_filter(hisi_ptt, event->attr.config);
	if (ret < 0)
		return ret;