* [PATCH] perf/x86/intel: Fix the building warning for i386 arch
@ 2025-11-12 6:35 Dapeng Mi
0 siblings, 0 replies; only message in thread
From: Dapeng Mi @ 2025-11-12 6:35 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Ian Rogers, Adrian Hunter, Alexander Shishkin,
Andi Kleen, Eranian Stephane
Cc: linux-kernel, linux-perf-users, Dapeng Mi, Zide Chen,
Falcon Thomas, Xudong Hao, Dapeng Mi, Stephen Rothwell
The warnings below are seen for building i386 arch image.
arch/x86/events/intel/ds.c: In function 'intel_pmu_drain_arch_pebs':
arch/x86/events/intel/ds.c:2983:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
2983 | top = (void *)((u64)cpuc->pebs_vaddr +
| ^
arch/x86/events/intel/ds.c:2983:15: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
2983 | top = (void *)((u64)cpuc->pebs_vaddr +
| ^
cc1: all warnings being treated as errors
change "u64" to "unsigned long" to fix the building error.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20251112154200.4d3671f9@canb.auug.org.au/
Fixes: d21954c8a0ff ("perf/x86/intel: Process arch-PEBS records or record fragments")
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
---
arch/x86/events/intel/ds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index c93bf971d97b..f695de9f7049 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -2979,7 +2979,7 @@ static void intel_pmu_drain_arch_pebs(struct pt_regs *iregs,
}
base = cpuc->pebs_vaddr;
- top = (void *)((u64)cpuc->pebs_vaddr +
+ top = (void *)((unsigned long)cpuc->pebs_vaddr +
(index.wr << ARCH_PEBS_INDEX_WR_SHIFT));
index.wr = 0;
base-commit: 2093d8cf80fa5552d1025a78a8f3a10bf3b6466e
prerequisite-patch-id: a15bcd62a8dcd219d17489eef88b66ea5488a2a0
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-12 6:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12 6:35 [PATCH] perf/x86/intel: Fix the building warning for i386 arch Dapeng Mi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).