* [intel-lts:6.12/linux 857/985] drivers/gpu/drm/i915/gt/iov/selftests/selftest_mock_iov_ggtt.c:318:27: warning: implicit conversion from 'unsigned long long' to 'size_t' (aka 'unsigned int') changes value from 4294967296 to 0
@ 2024-12-18 7:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-18 7:39 UTC (permalink / raw)
To: Piotr Piórkowski
Cc: oe-kbuild-all, Junxiao Chang, Zawawi, Muhammad Zul Husni
tree: https://github.com/intel/linux-intel-lts.git 6.12/linux
head: cc39c53db6bcd7f04407f1cae883e5d0af6db765
commit: 9b622d237b5e58a4487cdd78f397ee43161ebab0 [857/985] drm/i915/iov: Shadow GGTT mock selftestes
config: i386-buildonly-randconfig-006-20241218 (https://download.01.org/0day-ci/archive/20241218/202412181544.Py10CSwa-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241218/202412181544.Py10CSwa-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412181544.Py10CSwa-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/gt/iov/intel_iov_ggtt.c:7:
In file included from drivers/gpu/drm/i915/gt/iov/intel_iov_ggtt.h:9:
In file included from drivers/gpu/drm/i915/gt/intel_gtt.h:19:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from drivers/gpu/drm/i915/gt/iov/intel_iov_ggtt.c:589:
>> drivers/gpu/drm/i915/gt/iov/selftests/selftest_mock_iov_ggtt.c:318:27: warning: implicit conversion from 'unsigned long long' to 'size_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion]
318 | const size_t ggtt_size = SZ_4G;
| ~~~~~~~~~ ^~~~~
include/linux/sizes.h:46:18: note: expanded from macro 'SZ_4G'
46 | #define SZ_4G _AC(0x100000000, ULL)
| ^~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
21 | #define _AC(X,Y) __AC(X,Y)
| ^~~~~~~~~
include/uapi/linux/const.h:20:20: note: expanded from macro '__AC'
20 | #define __AC(X,Y) (X##Y)
| ^~~~
<scratch space>:53:1: note: expanded from here
53 | 0x100000000ULL
| ^~~~~~~~~~~~~~
2 warnings generated.
vim +318 drivers/gpu/drm/i915/gt/iov/selftests/selftest_mock_iov_ggtt.c
313
314 static int mock_ggtt_shadow_restore_new_vfid(void *arg)
315 {
316 struct intel_iov *iov = arg;
317 const u64 start_ggtt = 0;
> 318 const size_t ggtt_size = SZ_4G;
319 const unsigned int vfid = VFID(1);
320 const unsigned int new_vfid = VFID(2);
321 struct drm_mm_node *old_node, *new_node;
322 gen8_pte_t *buf, *origin_buf, *shadow_ggtt, *hw_ptes;
323 size_t size;
324 u64 ggtt_addr;
325 int err;
326
327 err = mock_ggtt_shadow_init_test(iov);
328 if (err < 0)
329 return err;
330
331 old_node = mock_provisioning_ggtt_init(iov, vfid, start_ggtt, ggtt_size);
332 new_node = mock_provisioning_ggtt_init(iov, new_vfid, start_ggtt, ggtt_size);
333
334 size = ggtt_size_to_ptes_size(ggtt_size);
335
336 iov->pf.ggtt.selftest.mock_update_ptes = mock_update_ptes;
337 iov->pf.ggtt.selftest.ptes = kvzalloc(size, GFP_KERNEL);
338 if (!iov->pf.ggtt.selftest.ptes) {
339 err = -ENOMEM;
340 goto out_fini;
341 }
342
343 origin_buf = kvzalloc(size, GFP_KERNEL);
344 if (!origin_buf) {
345 err = -ENOMEM;
346 goto out_free_ptes;
347 }
348
349 err = intel_iov_ggtt_shadow_vf_alloc(iov, vfid, old_node);
350 if (err < 0)
351 goto out_free_buf;
352
353 err = intel_iov_ggtt_shadow_vf_alloc(iov, new_vfid, new_node);
354 if (err < 0)
355 goto out_free_vf;
356
357 buf = origin_buf;
358 for_each_ggtt_page(ggtt_addr, old_node)
359 *(buf++) = make_pte(ggtt_addr, 0);
360
361 intel_iov_ggtt_shadow_restore(iov, new_vfid, origin_buf, size,
362 FIELD_PREP(I915_GGTT_RESTORE_PTES_VFID_MASK, new_vfid) |
363 I915_GGTT_RESTORE_PTES_NEW_VFID);
364
365 shadow_ggtt = iov->pf.ggtt.shadows_ggtt[new_vfid].ptes;
366 hw_ptes = iov->pf.ggtt.selftest.ptes;
367 for_each_ggtt_page(ggtt_addr, new_node) {
368 gen8_pte_t current_shadow_pte = *(shadow_ggtt++);
369 gen8_pte_t current_hw_pte = *(hw_ptes++);
370 gen8_pte_t expected_pte = make_pte(ggtt_addr, new_vfid);
371
372 if (current_shadow_pte != expected_pte || current_hw_pte != expected_pte) {
373 IOV_SELFTEST_ERROR(iov,
374 "PTE values for GGTT address %llx, not match with expected value, expected: %#llx from shadow GGTT: %#llx, from HW: %#llx\n",
375 ggtt_addr, expected_pte, current_shadow_pte,
376 current_hw_pte);
377 err = -EINVAL;
378 break;
379 }
380 }
381
382 intel_iov_ggtt_shadow_vf_free(iov, new_vfid);
383 out_free_vf:
384 intel_iov_ggtt_shadow_vf_free(iov, vfid);
385 out_free_buf:
386 kvfree(origin_buf);
387 out_free_ptes:
388 kvfree(iov->pf.ggtt.selftest.ptes);
389 iov->pf.ggtt.selftest.ptes = NULL;
390 out_fini:
391 mock_ggtt_shadow_fini_test(iov);
392 return err;
393 }
394
--
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:[~2024-12-18 7:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18 7:39 [intel-lts:6.12/linux 857/985] drivers/gpu/drm/i915/gt/iov/selftests/selftest_mock_iov_ggtt.c:318:27: warning: implicit conversion from 'unsigned long long' to 'size_t' (aka 'unsigned int') changes value from 4294967296 to 0 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.