From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AB3A1EE7BE for ; Tue, 10 Dec 2024 23:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733875027; cv=none; b=j66ZaYfpwCNXp/FfFETCPHTfb2YOmHmMvSxLgAbrLXUwQLeWFox+d45pFGRrAONbB3sQUO/7zH0gNdk4JOpGkhXuOiaKliFaK5siAhyL8uHD3GAUscw4bzRcUHL38YOWJ6ySPtlAQRAWTHtqZmFJN8moJqSgvaG42aHkOU7U6lI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733875027; c=relaxed/simple; bh=EqygIXHKtdGNvOsZOigbsmCEMu5TwQj3TkApYZIr7Qg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=BwMRXYBCGOPy7q9tqfLFeEno5WONkSsKDH/WFlJFaJBY4+SrghLshVmFL8BdOAU/q1B/l2qf3f7OpeIkVgH+jN2fMoqOdS8fuE7SaxBX5E3YaGLwOtLzB4ngv90k7Q4ZZygCheE/u/df8Atwk9+cII5gVqP/nDM7fskzFpBk11Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NSiV5939; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NSiV5939" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733875024; x=1765411024; h=date:from:to:cc:subject:message-id:mime-version; bh=EqygIXHKtdGNvOsZOigbsmCEMu5TwQj3TkApYZIr7Qg=; b=NSiV5939DxjD8tDHT4MX0tkaf+3GsHg210QgzWfFtX6SlB8dh9pmD2p7 UE/sldfuAyYlJ87PWYUA+TcHEShVNkQurJcSX6YtS0ixdSuXNAI3vGXjq XibkYqMwkLYUIs2pE0hvyKGh/GB366zh/1IOrG/afjAs4stzF2kcE0nJa RCF3p9Z0sVr0lud74Y2XmK+oQHc207FmExiTOIviQt+Yak23MsQhv0+jK AcUrzsqQx6IgimyLnV99rjQ+IYT6xhIbmHQK0p/5dxZU8nxLb5Snplhhu 1Ah4qT5LH45XFS4Fr3OYVl/EdK58bCv5Q5HdjJX4cy2EvLtf9OPiG/GJ1 w==; X-CSE-ConnectionGUID: YF60KkbUSoeVg744rGoWqQ== X-CSE-MsgGUID: aKyHLsuCQy+IX1kWwfBLzA== X-IronPort-AV: E=McAfee;i="6700,10204,11282"; a="21822786" X-IronPort-AV: E=Sophos;i="6.12,223,1728975600"; d="scan'208";a="21822786" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2024 15:57:03 -0800 X-CSE-ConnectionGUID: H9RSBiuQQkeD7vOv3ITWxw== X-CSE-MsgGUID: 7hYt4exhRru4UJVfrJofKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,223,1728975600"; d="scan'208";a="95638404" Received: from lkp-server01.sh.intel.com (HELO 82a3f569d0cb) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 10 Dec 2024 15:57:02 -0800 Received: from kbuild by 82a3f569d0cb with local (Exim 4.96) (envelope-from ) id 1tLA67-00064Y-1o; Tue, 10 Dec 2024 23:56:59 +0000 Date: Wed, 11 Dec 2024 07:56:16 +0800 From: kernel test robot To: Ashutosh Dixit Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Umesh Nerlige Ramappa Subject: drivers/gpu/drm/xe/xe_oa.c:401:15: sparse: sparse: incorrect type in initializer (different address spaces) Message-ID: <202412110733.NL3DGHyV-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7cb1b466315004af98f6ba6c2546bb713ca3c237 commit: cdf02fe1a94a768cbcd20f5c4e1a1d805f4a06c0 drm/xe/oa/uapi: Add/remove OA config perf ops date: 6 months ago config: csky-randconfig-r121-20241211 (https://download.01.org/0day-ci/archive/20241211/202412110733.NL3DGHyV-lkp@intel.com/config) compiler: csky-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241211/202412110733.NL3DGHyV-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202412110733.NL3DGHyV-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/gpu/drm/xe/xe_oa.c:388: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:388:25: sparse: expected unsigned long long [usertype] *ptr drivers/gpu/drm/xe/xe_oa.c:388:25: sparse: got void [noderef] __user * >> drivers/gpu/drm/xe/xe_oa.c:401:15: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long long [usertype] *ptr @@ drivers/gpu/drm/xe/xe_oa.c:401:15: sparse: expected void const [noderef] __user *__p drivers/gpu/drm/xe/xe_oa.c:401:15: sparse: got unsigned long long [usertype] *ptr drivers/gpu/drm/xe/xe_oa.c: note: in included file (through include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...): include/linux/uaccess.h:102:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *from @@ got void const [noderef] __user *from @@ include/linux/uaccess.h:102:38: sparse: expected void const *from include/linux/uaccess.h:102:38: sparse: got void const [noderef] __user *from vim +401 drivers/gpu/drm/xe/xe_oa.c 377 378 /** 379 * xe_oa_remove_config_ioctl - Removes one OA config 380 * @dev: @drm_device 381 * @data: pointer to struct @drm_xe_perf_param 382 * @file: @drm_file 383 */ 384 int xe_oa_remove_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file) 385 { 386 struct xe_oa *oa = &to_xe_device(dev)->oa; 387 struct xe_oa_config *oa_config; 388 u64 arg, *ptr = u64_to_user_ptr(data); 389 int ret; 390 391 if (!oa->xe) { 392 drm_dbg(&oa->xe->drm, "xe oa interface not available for this system\n"); 393 return -ENODEV; 394 } 395 396 if (xe_perf_stream_paranoid && !perfmon_capable()) { 397 drm_dbg(&oa->xe->drm, "Insufficient privileges to remove xe OA config\n"); 398 return -EACCES; 399 } 400 > 401 ret = get_user(arg, ptr); 402 if (XE_IOCTL_DBG(oa->xe, ret)) 403 return ret; 404 405 ret = mutex_lock_interruptible(&oa->metrics_lock); 406 if (ret) 407 return ret; 408 409 oa_config = idr_find(&oa->metrics_idr, arg); 410 if (!oa_config) { 411 drm_dbg(&oa->xe->drm, "Failed to remove unknown OA config\n"); 412 ret = -ENOENT; 413 goto err_unlock; 414 } 415 416 WARN_ON(arg != oa_config->id); 417 418 sysfs_remove_group(oa->metrics_kobj, &oa_config->sysfs_metric); 419 idr_remove(&oa->metrics_idr, arg); 420 421 mutex_unlock(&oa->metrics_lock); 422 423 drm_dbg(&oa->xe->drm, "Removed config %s id=%i\n", oa_config->uuid, oa_config->id); 424 425 xe_oa_config_put(oa_config); 426 427 return 0; 428 429 err_unlock: 430 mutex_unlock(&oa->metrics_lock); 431 return ret; 432 } 433 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki