From: kernel test robot <lkp@intel.com>
To: Harry Austen <hpausten@protonmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Wed, 06 May 2026 00:28:16 +0800 [thread overview]
Message-ID: <202605060058.gvgETBpP-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a293ec25d59dd96309058c70df5a4dd0f889a1e4
commit: aa18d5769fcafe645a3ba01a9a69dde4f8dc8cc3 drm/xe: Allow dropping kunit dependency as built-in
date: 10 months ago
config: arm-randconfig-r132-20260505 (https://download.01.org/0day-ci/archive/20260506/202605060058.gvgETBpP-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605060058.gvgETBpP-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
| Fixes: aa18d5769fca ("drm/xe: Allow dropping kunit dependency as built-in")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605060058.gvgETBpP-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/xe/xe_oa.c:2371:25: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *ptr @@ got void [noderef] __user * @@
drivers/gpu/drm/xe/xe_oa.c:2371:25: sparse: expected unsigned long long [usertype] *ptr
drivers/gpu/drm/xe/xe_oa.c:2371:25: sparse: got void [noderef] __user *
>> drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [noderef] __user *register __p @@ got unsigned long long [usertype] *ptr @@
drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: expected unsigned long long [noderef] __user *register __p
drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: got unsigned long long [usertype] *ptr
vim +2384 drivers/gpu/drm/xe/xe_oa.c
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2359
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2360 /**
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2361 * xe_oa_remove_config_ioctl - Removes one OA config
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2362 * @dev: @drm_device
8169b2097d88d9 Ashutosh Dixit 2024-07-03 2363 * @data: pointer to struct @drm_xe_observation_param
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2364 * @file: @drm_file
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2365 */
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2366 int xe_oa_remove_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file)
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2367 {
cb925d31f09146 Michal Wajdeczko 2024-06-19 2368 struct xe_device *xe = to_xe_device(dev);
cb925d31f09146 Michal Wajdeczko 2024-06-19 2369 struct xe_oa *oa = &xe->oa;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2370 struct xe_oa_config *oa_config;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 @2371 u64 arg, *ptr = u64_to_user_ptr(data);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2372 int ret;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2373
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2374 if (!oa->xe) {
cb925d31f09146 Michal Wajdeczko 2024-06-19 2375 drm_dbg(&xe->drm, "xe oa interface not available for this system\n");
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2376 return -ENODEV;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2377 }
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2378
8169b2097d88d9 Ashutosh Dixit 2024-07-03 2379 if (xe_observation_paranoid && !perfmon_capable()) {
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2380 drm_dbg(&oa->xe->drm, "Insufficient privileges to remove xe OA config\n");
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2381 return -EACCES;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2382 }
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2383
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 @2384 ret = get_user(arg, ptr);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2385 if (XE_IOCTL_DBG(oa->xe, ret))
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2386 return ret;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2387
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2388 ret = mutex_lock_interruptible(&oa->metrics_lock);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2389 if (ret)
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2390 return ret;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2391
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2392 oa_config = idr_find(&oa->metrics_idr, arg);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2393 if (!oa_config) {
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2394 drm_dbg(&oa->xe->drm, "Failed to remove unknown OA config\n");
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2395 ret = -ENOENT;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2396 goto err_unlock;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2397 }
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2398
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2399 WARN_ON(arg != oa_config->id);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2400
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2401 sysfs_remove_group(oa->metrics_kobj, &oa_config->sysfs_metric);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2402 idr_remove(&oa->metrics_idr, arg);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2403
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2404 mutex_unlock(&oa->metrics_lock);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2405
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2406 drm_dbg(&oa->xe->drm, "Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2407
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2408 xe_oa_config_put(oa_config);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2409
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2410 return 0;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2411
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2412 err_unlock:
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2413 mutex_unlock(&oa->metrics_lock);
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2414 return ret;
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2415 }
cdf02fe1a94a76 Ashutosh Dixit 2024-06-17 2416
:::::: The code at line 2384 was first introduced by commit
:::::: cdf02fe1a94a768cbcd20f5c4e1a1d805f4a06c0 drm/xe/oa/uapi: Add/remove OA config perf ops
:::::: TO: Ashutosh Dixit <ashutosh.dixit@intel.com>
:::::: CC: Ashutosh Dixit <ashutosh.dixit@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-05 16:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202605060058.gvgETBpP-lkp@intel.com \
--to=lkp@intel.com \
--cc=hpausten@protonmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox