Hi David, kernel test robot noticed the following build errors:
[auto build test ERROR on drm-exynos/exynos-drm-next] [also build test ERROR on linus/master v6.16-rc2] [cannot apply to next-20250618] [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/David-Francis/drm-amdgpu-Add-CRIU-ioctl-to-get-bo-info/20250618-044539 base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next patch link: https://lore.kernel.org/r/20250617194536.538681-4-David.Francis%40amd.com patch subject: [PATCH 3/4] drm/amdgpu: Add CRIU mapping info ioctl config: i386-buildonly-randconfig-005-20250618 (https://download.01.org/0day-ci/archive/20250618/[email protected]/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/20250618/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'invalids' in 'struct amdgpu_bo_va_mapping' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^ ~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:40: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~ ^ include/linux/list.h:770:30: note: expanded from macro 'list_for_each_entry' 770 | for (pos = list_first_entry(head, typeof(*pos), member); \ | ^~~~ include/linux/list.h:612:14: note: expanded from macro 'list_first_entry' 612 | list_entry((ptr)->next, type, member) | ^~~ include/linux/list.h:601:15: note: expanded from macro 'list_entry' 601 | container_of(ptr, type, member) | ^~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'invalids' in 'struct amdgpu_bo_va_mapping' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^ ~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:40: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~ ^ include/linux/list.h:770:30: note: expanded from macro 'list_for_each_entry' 770 | for (pos = list_first_entry(head, typeof(*pos), member); \ | ^~~~ include/linux/list.h:612:14: note: expanded from macro 'list_first_entry' 612 | list_entry((ptr)->next, type, member) | ^~~ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:503:63: note: expanded from macro '__same_type' 503 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'invalids' in 'struct amdgpu_bo_va_mapping' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^ ~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:40: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~ ^ include/linux/list.h:770:30: note: expanded from macro 'list_for_each_entry' 770 | for (pos = list_first_entry(head, typeof(*pos), member); \ | ^~~~ include/linux/list.h:612:14: note: expanded from macro 'list_first_entry' 612 | list_entry((ptr)->next, type, member) | ^~~ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:503:63: note: expanded from macro '__same_type' 503 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:3: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ^ ~~~~ include/linux/list.h:770:13: note: expanded from macro 'list_for_each_entry' 770 | for (pos = list_first_entry(head, typeof(*pos), member); \ | ^ ~~~~~~ include/linux/list.h:612:2: note: expanded from macro 'list_first_entry' 612 | list_entry((ptr)->next, type, member) | ^ ~~~~~~ include/linux/list.h:601:2: note: expanded from macro 'list_entry' 601 | container_of(ptr, type, member) | ^ ~~~~~~ include/linux/container_of.h:23:21: note: expanded from macro 'container_of' 23 | ((type *)(__mptr - offsetof(type, member))); }) | ^ ~~~~~~ include/linux/stddef.h:16:32: note: expanded from macro 'offsetof' 16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^ ~~~~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'struct amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^ ~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:50: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~~~ ^ include/linux/list.h:771:38: note: expanded from macro 'list_for_each_entry' 771 | !list_entry_is_head(pos, head, member); \ | ~~~ ^ include/linux/list.h:761:21: note: expanded from macro 'list_entry_is_head' 761 | list_is_head(&pos->member, (head)) | ~~~ ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'invalids' in 'struct amdgpu_bo_va_mapping' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^ ~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:40: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~ ^ include/linux/list.h:771:32: note: expanded from macro 'list_for_each_entry' 771 | !list_entry_is_head(pos, head, member); \ | ^~~~ include/linux/list.h:761:30: note: expanded from macro 'list_entry_is_head' 761 | list_is_head(&pos->member, (head)) | ^~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'struct amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:50: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/linux/list.h:772:34: note: expanded from macro 'list_for_each_entry' 772 | pos = list_next_entry(pos, member)) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ include/linux/list.h:645:20: note: expanded from macro 'list_next_entry' 645 | list_entry((pos)->member.next, typeof(*(pos)), member) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:601:15: note: expanded from macro 'list_entry' 601 | container_of(ptr, type, member) | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'struct amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:50: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/linux/list.h:772:34: note: expanded from macro 'list_for_each_entry' 772 | pos = list_next_entry(pos, member)) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ include/linux/list.h:645:20: note: expanded from macro 'list_next_entry' 645 | list_entry((pos)->member.next, typeof(*(pos)), member) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:503:63: note: expanded from macro '__same_type' 503 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'struct amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:50: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ include/linux/list.h:772:34: note: expanded from macro 'list_for_each_entry' 772 | pos = list_next_entry(pos, member)) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ include/linux/list.h:645:20: note: expanded from macro 'list_next_entry' 645 | list_entry((pos)->member.next, typeof(*(pos)), member) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:503:63: note: expanded from macro '__same_type' 503 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c:208:2: error: no member named >> 'list' in 'amdgpu_bo_va' 208 | amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h:674:3: note: expanded from macro 'amdgpu_vm_bo_va_for_each_invalid_mapping' 674 | list_for_each_entry(mapping, &bo_va->invalids, list) | ^ ~~~~ include/linux/list.h:772:13: note: expanded from macro 'list_for_each_entry' 772 | pos = list_next_entry(pos, member)) | ^ ~~~~~~ include/linux/list.h:645:2: note: expanded from macro 'list_next_entry' 645 | list_entry((pos)->member.next, typeof(*(pos)), member) | ^ ~~~~~~ include/linux/list.h:601:2: note: expanded from macro 'list_entry' 601 | container_of(ptr, type, member) | ^ ~~~~~~ include/linux/container_of.h:23:21: note: expanded from macro 'container_of' 23 | ((type *)(__mptr - offsetof(type, member))); }) | ^ ~~~~~~ include/linux/stddef.h:16:32: note: expanded from macro 'offsetof' 16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^ ~~~~~~ 10 errors generated. vim +208 drivers/gpu/drm/amd/amdgpu/amdgpu_criu.c 145 146 /** 147 * amdgpu_criu_mapping_info_ioctl - get information about a buffer's mappings 148 * 149 * @dev: drm device pointer 150 * @data: drm_amdgpu_criu_mapping_info_args 151 * @filp: drm file pointer 152 * 153 * num_mappings is set as an input to the size of the vm_buckets array. 154 * num_mappings is sent back as output as the number of mappings the bo has. 155 * If that number is larger than the size of the array, the ioctl must 156 * be retried. 157 * 158 * Returns: 159 * 0 for success, -errno for errors. 160 */ 161 int amdgpu_criu_mapping_info_ioctl(struct drm_device *dev, void *data, 162 struct drm_file *filp) 163 { 164 struct drm_amdgpu_criu_mapping_info_args *args = data; 165 struct drm_gem_object *gobj = idr_find(&filp->object_idr, args->gem_handle); 166 struct amdgpu_vm *avm = &((struct amdgpu_fpriv *)filp->driver_priv)->vm; 167 struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); 168 struct amdgpu_bo_va *bo_va = amdgpu_vm_bo_find(avm, bo); 169 struct amdgpu_fpriv *fpriv = filp->driver_priv; 170 struct drm_amdgpu_criu_vm_bucket *vm_buckets; 171 struct amdgpu_bo_va_mapping *mapping; 172 struct drm_exec exec; 173 int num_mappings = 0; 174 int ret; 175 176 vm_buckets = kvzalloc(args->num_mappings * sizeof(*vm_buckets), GFP_KERNEL); 177 if (!vm_buckets) { 178 ret = -ENOMEM; 179 goto free_vms; 180 } 181 182 drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT | 183 DRM_EXEC_IGNORE_DUPLICATES, 0); 184 drm_exec_until_all_locked(&exec) { 185 if (gobj) { 186 ret = drm_exec_lock_obj(&exec, gobj); 187 drm_exec_retry_on_contention(&exec); 188 if (ret) 189 goto unlock_exec; 190 } 191 192 ret = amdgpu_vm_lock_pd(&fpriv->vm, &exec, 2); 193 drm_exec_retry_on_contention(&exec); 194 if (ret) 195 goto unlock_exec; 196 } 197 198 amdgpu_vm_bo_va_for_each_valid_mapping(bo_va, mapping) { 199 if (num_mappings < args->num_mappings) { 200 vm_buckets[num_mappings].start = mapping->start; 201 vm_buckets[num_mappings].last = mapping->last; 202 vm_buckets[num_mappings].offset = mapping->offset; 203 vm_buckets[num_mappings].flags = hardware_flags_to_uapi_flags(drm_to_adev(dev), mapping->flags); 204 } 205 num_mappings += 1; 206 } 207 > 208 amdgpu_vm_bo_va_for_each_invalid_mapping(mapping, bo_va) { -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
