* [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size
@ 2026-02-27 7:39 kernel test robot
2026-02-27 7:46 ` Mi, Dapeng
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-02-27 7:39 UTC (permalink / raw)
To: Dapeng Mi; +Cc: oe-kbuild-all, Lili Li
Hi Dapeng,
FYI, the error/warning still remains.
tree: https://github.com/projectacrn/acrn-kernel 6.17/linux
head: eac6d3b7a20ffb9d3102dbdc152241a7184a63cd
commit: 67977912bebfec14bf4c0ced6c01df309725fc8d [51/3102] perf/x86/intel: Process arch-PEBS records or record fragments
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20260227/202602271552.8NPMraId-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602271552.8NPMraId-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602271552.8NPMraId-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/events/intel/ds.c: In function 'intel_pmu_drain_arch_pebs':
>> arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2881 | top = (void *)((u64)cpuc->ds_pebs_vaddr +
| ^
>> arch/x86/events/intel/ds.c:2881:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2881 | top = (void *)((u64)cpuc->ds_pebs_vaddr +
| ^
vim +2881 arch/x86/events/intel/ds.c
2860
2861 static void intel_pmu_drain_arch_pebs(struct pt_regs *iregs,
2862 struct perf_sample_data *data)
2863 {
2864 short counts[INTEL_PMC_IDX_FIXED + MAX_FIXED_PEBS_EVENTS] = {};
2865 void *last[INTEL_PMC_IDX_FIXED + MAX_FIXED_PEBS_EVENTS];
2866 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
2867 union arch_pebs_index index;
2868 struct x86_perf_regs perf_regs;
2869 struct pt_regs *regs = &perf_regs.regs;
2870 void *base, *at, *top;
2871 u64 mask;
2872
2873 rdmsrq(MSR_IA32_PEBS_INDEX, index.full);
2874
2875 if (unlikely(!index.split.wr)) {
2876 intel_pmu_pebs_event_update_no_drain(cpuc, X86_PMC_IDX_MAX);
2877 return;
2878 }
2879
2880 base = cpuc->ds_pebs_vaddr;
> 2881 top = (void *)((u64)cpuc->ds_pebs_vaddr +
2882 (index.split.wr << ARCH_PEBS_INDEX_WR_SHIFT));
2883
2884 mask = hybrid(cpuc->pmu, arch_pebs_cap).counters & cpuc->pebs_enabled;
2885
2886 if (!iregs)
2887 iregs = &dummy_iregs;
2888
2889 /* Process all but the last event for each counter. */
2890 for (at = base; at < top;) {
2891 struct arch_pebs_header *header;
2892 struct arch_pebs_basic *basic;
2893 u64 pebs_status;
2894
2895 header = at;
2896
2897 if (WARN_ON_ONCE(!header->size))
2898 break;
2899
2900 /* 1st fragment or single record must have basic group */
2901 if (!header->basic) {
2902 at += header->size;
2903 continue;
2904 }
2905
2906 basic = at + sizeof(struct arch_pebs_header);
2907 pebs_status = mask & basic->applicable_counters;
2908 __intel_pmu_handle_pebs_record(iregs, regs, data, at,
2909 pebs_status, counts, last,
2910 setup_arch_pebs_sample_data);
2911
2912 /* Skip non-last fragments */
2913 while (arch_pebs_record_continued(header)) {
2914 if (!header->size)
2915 break;
2916 at += header->size;
2917 header = at;
2918 }
2919
2920 /* Skip last fragment or the single record */
2921 at += header->size;
2922 }
2923
2924 __intel_pmu_handle_last_pebs_record(iregs, regs, data, mask, counts,
2925 last, setup_arch_pebs_sample_data);
2926
2927 index.split.wr = 0;
2928 index.split.full = 0;
2929 wrmsrq(MSR_IA32_PEBS_INDEX, index.full);
2930 }
2931
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size
2026-02-27 7:39 [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size kernel test robot
@ 2026-02-27 7:46 ` Mi, Dapeng
0 siblings, 0 replies; 2+ messages in thread
From: Mi, Dapeng @ 2026-02-27 7:46 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, Lili Li
This warning has been fixed in upstream tree and It seems the acrn kernel
still uses the old patches. Thanks.
On 2/27/2026 3:39 PM, kernel test robot wrote:
> Hi Dapeng,
>
> FYI, the error/warning still remains.
>
> tree: https://github.com/projectacrn/acrn-kernel 6.17/linux
> head: eac6d3b7a20ffb9d3102dbdc152241a7184a63cd
> commit: 67977912bebfec14bf4c0ced6c01df309725fc8d [51/3102] perf/x86/intel: Process arch-PEBS records or record fragments
> config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20260227/202602271552.8NPMraId-lkp@intel.com/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602271552.8NPMraId-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202602271552.8NPMraId-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> arch/x86/events/intel/ds.c: In function 'intel_pmu_drain_arch_pebs':
>>> arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 2881 | top = (void *)((u64)cpuc->ds_pebs_vaddr +
> | ^
>>> arch/x86/events/intel/ds.c:2881:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 2881 | top = (void *)((u64)cpuc->ds_pebs_vaddr +
> | ^
>
>
> vim +2881 arch/x86/events/intel/ds.c
>
> 2860
> 2861 static void intel_pmu_drain_arch_pebs(struct pt_regs *iregs,
> 2862 struct perf_sample_data *data)
> 2863 {
> 2864 short counts[INTEL_PMC_IDX_FIXED + MAX_FIXED_PEBS_EVENTS] = {};
> 2865 void *last[INTEL_PMC_IDX_FIXED + MAX_FIXED_PEBS_EVENTS];
> 2866 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
> 2867 union arch_pebs_index index;
> 2868 struct x86_perf_regs perf_regs;
> 2869 struct pt_regs *regs = &perf_regs.regs;
> 2870 void *base, *at, *top;
> 2871 u64 mask;
> 2872
> 2873 rdmsrq(MSR_IA32_PEBS_INDEX, index.full);
> 2874
> 2875 if (unlikely(!index.split.wr)) {
> 2876 intel_pmu_pebs_event_update_no_drain(cpuc, X86_PMC_IDX_MAX);
> 2877 return;
> 2878 }
> 2879
> 2880 base = cpuc->ds_pebs_vaddr;
>> 2881 top = (void *)((u64)cpuc->ds_pebs_vaddr +
> 2882 (index.split.wr << ARCH_PEBS_INDEX_WR_SHIFT));
> 2883
> 2884 mask = hybrid(cpuc->pmu, arch_pebs_cap).counters & cpuc->pebs_enabled;
> 2885
> 2886 if (!iregs)
> 2887 iregs = &dummy_iregs;
> 2888
> 2889 /* Process all but the last event for each counter. */
> 2890 for (at = base; at < top;) {
> 2891 struct arch_pebs_header *header;
> 2892 struct arch_pebs_basic *basic;
> 2893 u64 pebs_status;
> 2894
> 2895 header = at;
> 2896
> 2897 if (WARN_ON_ONCE(!header->size))
> 2898 break;
> 2899
> 2900 /* 1st fragment or single record must have basic group */
> 2901 if (!header->basic) {
> 2902 at += header->size;
> 2903 continue;
> 2904 }
> 2905
> 2906 basic = at + sizeof(struct arch_pebs_header);
> 2907 pebs_status = mask & basic->applicable_counters;
> 2908 __intel_pmu_handle_pebs_record(iregs, regs, data, at,
> 2909 pebs_status, counts, last,
> 2910 setup_arch_pebs_sample_data);
> 2911
> 2912 /* Skip non-last fragments */
> 2913 while (arch_pebs_record_continued(header)) {
> 2914 if (!header->size)
> 2915 break;
> 2916 at += header->size;
> 2917 header = at;
> 2918 }
> 2919
> 2920 /* Skip last fragment or the single record */
> 2921 at += header->size;
> 2922 }
> 2923
> 2924 __intel_pmu_handle_last_pebs_record(iregs, regs, data, mask, counts,
> 2925 last, setup_arch_pebs_sample_data);
> 2926
> 2927 index.split.wr = 0;
> 2928 index.split.full = 0;
> 2929 wrmsrq(MSR_IA32_PEBS_INDEX, index.full);
> 2930 }
> 2931
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-27 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 7:39 [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size kernel test robot
2026-02-27 7:46 ` Mi, Dapeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.