Skip to content

Commit 9929dff

Browse files
committed
perf/x86/intel: Fix and clean up intel_pmu_drain_arch_pebs() type use
The following commit introduced a build failure on x86-32: 21954c8a0ff ("perf/x86/intel: Process arch-PEBS records or record fragments") ... arch/x86/events/intel/ds.c:2983:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] The forced type conversion to 'u64' and 'void *' are not 32-bit clean, but they are also entirely unnecessary: ->pebs_vaddr is 'void *' already, and integer-compatible pointer arithmetics will work just fine on it. Fix & simplify the code. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: d21954c ("perf/x86/intel: Process arch-PEBS records or record fragments") Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Link: https://patch.msgid.link/20251029102136.61364-10-dapeng1.mi@linux.intel.com
1 parent 2093d8c commit 9929dff

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • arch/x86/events/intel

arch/x86/events/intel/ds.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,8 +2979,7 @@ static void intel_pmu_drain_arch_pebs(struct pt_regs *iregs,
29792979
}
29802980

29812981
base = cpuc->pebs_vaddr;
2982-
top = (void *)((u64)cpuc->pebs_vaddr +
2983-
(index.wr << ARCH_PEBS_INDEX_WR_SHIFT));
2982+
top = cpuc->pebs_vaddr + (index.wr << ARCH_PEBS_INDEX_WR_SHIFT);
29842983

29852984
index.wr = 0;
29862985
index.full = 0;

0 commit comments

Comments
 (0)