From: kernel test robot <lkp@intel.com>
To: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, Lili Li <lili.li@intel.com>
Subject: [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size
Date: Fri, 27 Feb 2026 15:39:20 +0800 [thread overview]
Message-ID: <202602271552.8NPMraId-lkp@intel.com> (raw)
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
next reply other threads:[~2026-02-27 7:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 7:39 kernel test robot [this message]
2026-02-27 7:46 ` [acrn:6.17/linux 51/3102] arch/x86/events/intel/ds.c:2881:24: warning: cast from pointer to integer of different size Mi, Dapeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202602271552.8NPMraId-lkp@intel.com \
--to=lkp@intel.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=lili.li@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.