Skip to content

Commit 8c28241

Browse files
ilkka-koskinenwilldeacon
authored andcommitted
perf: arm_cspmu: Split 64-bit write to 32-bit writes
Split the 64-bit register accesses if 64-bit access is not supported by the PMU. Signed-off-by: Ilkka Koskinen <[email protected]> Reviewed-by: Besar Wicaksono <[email protected]> Reviewed-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent bfc653a commit 8c28241

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/perf/arm_cspmu/arm_cspmu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,10 @@ static void arm_cspmu_write_counter(struct perf_event *event, u64 val)
719719
if (use_64b_counter_reg(cspmu)) {
720720
offset = counter_offset(sizeof(u64), event->hw.idx);
721721

722-
writeq(val, cspmu->base1 + offset);
722+
if (cspmu->has_atomic_dword)
723+
writeq(val, cspmu->base1 + offset);
724+
else
725+
lo_hi_writeq(val, cspmu->base1 + offset);
723726
} else {
724727
offset = counter_offset(sizeof(u32), event->hw.idx);
725728

0 commit comments

Comments
 (0)