Skip to content

Commit c61e572

Browse files
Jiucheng Xuwilldeacon
authored andcommitted
perf/amlogic: Fix config1/config2 parsing issue
The 3th argument of for_each_set_bit is incorrect, fix them. Fixes: 2016e21 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver") Signed-off-by: Jiucheng Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent bc12f34 commit c61e572

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/perf/amlogic/meson_ddr_pmu_core.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,14 @@ static int meson_ddr_perf_event_add(struct perf_event *event, int flags)
156156
u64 config2 = event->attr.config2;
157157
int i;
158158

159-
for_each_set_bit(i, (const unsigned long *)&config1, sizeof(config1))
159+
for_each_set_bit(i,
160+
(const unsigned long *)&config1,
161+
BITS_PER_TYPE(config1))
160162
meson_ddr_set_axi_filter(event, i);
161163

162-
for_each_set_bit(i, (const unsigned long *)&config2, sizeof(config2))
164+
for_each_set_bit(i,
165+
(const unsigned long *)&config2,
166+
BITS_PER_TYPE(config2))
163167
meson_ddr_set_axi_filter(event, i + 64);
164168

165169
if (flags & PERF_EF_START)

0 commit comments

Comments
 (0)