[PATCH v4 13/20] drm/xe/madvise: Update migration policy based on preferred location

kernel test robot lkp at intel.com
Sat Jun 14 05:33:53 UTC 2025


Hi Himal,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-xe/drm-xe-next]
[also build test ERROR on next-20250613]
[cannot apply to linus/master v6.16-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Himal-Prasad-Ghimiray/Introduce-drm_gpuvm_sm_map_ops_flags-enums-for-sm_map_ops/20250614-003138
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20250613125558.2607665-14-himal.prasad.ghimiray%40intel.com
patch subject: [PATCH v4 13/20] drm/xe/madvise: Update migration policy based on preferred location
config: i386-randconfig-016-20250614 (https://download.01.org/0day-ci/archive/20250614/202506141309.LKujADbP-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250614/202506141309.LKujADbP-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506141309.LKujADbP-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/xe/xe_vm_madvise.c:201:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions]
     201 |                 s32 fd = (s32)args->preferred_mem_loc.devmem_fd;
         |                 ^
   1 error generated.


vim +201 drivers/gpu/drm/xe/xe_vm_madvise.c

   177	
   178	static int drm_xe_madvise_args_are_sane(struct xe_device *xe, const struct drm_xe_madvise *args)
   179	{
   180		if (XE_IOCTL_DBG(xe, !args))
   181			return -EINVAL;
   182	
   183		if (XE_IOCTL_DBG(xe, !IS_ALIGNED(args->start, SZ_4K)))
   184			return -EINVAL;
   185	
   186		if (XE_IOCTL_DBG(xe, !IS_ALIGNED(args->range, SZ_4K)))
   187			return -EINVAL;
   188	
   189		if (XE_IOCTL_DBG(xe, args->range < SZ_4K))
   190			return -EINVAL;
   191	
   192		switch (args->type) {
   193		case DRM_XE_VMA_ATTR_ATOMIC:
   194			if (XE_IOCTL_DBG(xe, args->atomic.val > DRM_XE_VMA_ATOMIC_CPU))
   195				return -EINVAL;
   196			break;
   197		case DRM_XE_VMA_ATTR_PAT:
   198			/*TODO: Add valid pat check */
   199			break;
   200		case DRM_XE_VMA_ATTR_PREFERRED_LOC:
 > 201			s32 fd = (s32)args->preferred_mem_loc.devmem_fd;
   202	
   203			if (XE_IOCTL_DBG(xe, fd < DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM))
   204				return -EINVAL;
   205	
   206			if (XE_IOCTL_DBG(xe, args->preferred_mem_loc.migration_policy >
   207					     DRM_XE_MIGRATE_ONLY_SYSTEM_PAGES))
   208				return -EINVAL;
   209			break;
   210		default:
   211			if (XE_IOCTL_DBG(xe, 1))
   212				return -EINVAL;
   213		}
   214	
   215		if (XE_IOCTL_DBG(xe, args->reserved[0] || args->reserved[1]))
   216			return -EINVAL;
   217	
   218		return 0;
   219	}
   220	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


More information about the Intel-xe mailing list