* drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2026-05-05 16:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-05 16:28 UTC (permalink / raw)
To: Harry Austen; +Cc: oe-kbuild-all, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-05 16:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 16:28 drivers/gpu/drm/xe/xe_oa.c:2384:15: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox