Skip to content

Commit 4669551

Browse files
Yicong YangSuzuki K Poulose
authored andcommitted
hwtracing: hisi_ptt: Disable interrupt after trace end
On trace end we disable the hardware but leave the interrupt unmasked. Mask the interrupt to make the process reverse to the start. No actual issue since hardware should send no interrupt after disabled. Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20231010084731.30450-2-yangyicong@huawei.com
1 parent 845333e commit 4669551

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/hwtracing/ptt/hisi_ptt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ static void hisi_ptt_wait_dma_reset_done(struct hisi_ptt *hisi_ptt)
183183
static void hisi_ptt_trace_end(struct hisi_ptt *hisi_ptt)
184184
{
185185
writel(0, hisi_ptt->iobase + HISI_PTT_TRACE_CTRL);
186+
187+
/* Mask the interrupt on the end */
188+
writel(HISI_PTT_TRACE_INT_MASK_ALL, hisi_ptt->iobase + HISI_PTT_TRACE_INT_MASK);
189+
186190
hisi_ptt->trace_ctrl.started = false;
187191
}
188192

drivers/hwtracing/ptt/hisi_ptt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#define HISI_PTT_TRACE_INT_STAT 0x0890
4848
#define HISI_PTT_TRACE_INT_STAT_MASK GENMASK(3, 0)
4949
#define HISI_PTT_TRACE_INT_MASK 0x0894
50+
#define HISI_PTT_TRACE_INT_MASK_ALL GENMASK(3, 0)
5051
#define HISI_PTT_TUNING_INT_STAT 0x0898
5152
#define HISI_PTT_TUNING_INT_STAT_MASK BIT(0)
5253
#define HISI_PTT_TRACE_WR_STS 0x08a0

0 commit comments

Comments
 (0)