Skip to content

Commit 814be60

Browse files
zhangshkwilldeacon
authored andcommitted
drivers/perf: hisi: Fix data source control
'Data source' is a new function for HHA PMU and config / clear interface was wrong by mistake. 'HHA_DATSRC_CTRL' register is mainly used for data source configuration, if we enable bit0 as driver, it will go on count the event and we didn't check it carefully. So fix the issue and do as the initial purpose. Fixes: 932f6a9 ("drivers/perf: hisi: Add new functions for HHA PMU") Reported-by: kernel test robot <lkp@intel.com> Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> Link: https://lore.kernel.org/r/1622709291-37996-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 281e44f commit 814be60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/perf/hisilicon/hisi_uncore_hha_pmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static void hisi_hha_pmu_config_ds(struct perf_event *event)
9090

9191
val = readl(hha_pmu->base + HHA_DATSRC_CTRL);
9292
val |= HHA_DATSRC_SKT_EN;
93-
writel(ds_skt, hha_pmu->base + HHA_DATSRC_CTRL);
93+
writel(val, hha_pmu->base + HHA_DATSRC_CTRL);
9494
}
9595
}
9696

@@ -104,7 +104,7 @@ static void hisi_hha_pmu_clear_ds(struct perf_event *event)
104104

105105
val = readl(hha_pmu->base + HHA_DATSRC_CTRL);
106106
val &= ~HHA_DATSRC_SKT_EN;
107-
writel(ds_skt, hha_pmu->base + HHA_DATSRC_CTRL);
107+
writel(val, hha_pmu->base + HHA_DATSRC_CTRL);
108108
}
109109
}
110110

0 commit comments

Comments
 (0)