Subject: Re: linux-next: build failure after merge of the tip tree

From: "Mi, Dapeng" <[email-masked]>
Date: Wed, 12 Nov 2025 13:20:50 +0800

On 11/12/2025 12:42 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (i386 defconfig)
> failed like this:
>
> 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

Thanks for reporting the issue. I suppose the below patch would fix the
building error. I would post it as an independent patch later.

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;

>
> Caused by commit
>
>   d21954c8a0ff ("perf/x86/intel: Process arch-PEBS records or record fragments")
>
> I have reverted commits
>
>   2093d8cf80fa ("perf/x86/intel: Optimize PEBS extended config")
>   02da693f6658 ("perf/x86/intel: Check PEBS dyn_constraints")
>   bd24f9beed59 ("perf/x86/intel: Add a check for dynamic constraints")
>   bb5f13df3c45 ("perf/x86/intel: Add counter group support for arch-PEBS")
>   52448a0a7390 ("perf/x86/intel: Setup PEBS data configuration and enable legacy groups")
>   e89c5d1f290e ("perf/x86/intel: Update dyn_constraint base on PEBS event precise level")
>   2721e8da2de7 ("perf/x86/intel: Allocate arch-PEBS buffer and initialize PEBS_BASE MSR")
>   d21954c8a0ff ("perf/x86/intel: Process arch-PEBS records or record fragments")
>
> for today.
>