All of lore.kernel.org
 help / color / mirror / Atom feed
* [davidhildenbrand:device_exclusive 3/18] drivers/gpu/drm/nouveau/nouveau_svm.c:612:54: error: use of undeclared identifier 'folio'
@ 2025-02-12  8:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-12  8:57 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: llvm, oe-kbuild-all, Alistair Popple

tree:   https://github.com/davidhildenbrand/linux device_exclusive
head:   d9a18663f22814d78aeace0bbe852e4f13923d83
commit: 9910bc073e528fac18832a3046b6666ddc06859e [3/18] mm/rmap: convert make_device_exclusive_range() to make_device_exclusive()
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250212/202502121601.MBYPtaP8-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/20250212/202502121601.MBYPtaP8-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/202502121601.MBYPtaP8-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/nouveau/nouveau_svm.c:22:
   In file included from drivers/gpu/drm/nouveau/nouveau_svm.h:3:
   In file included from drivers/gpu/drm/nouveau/include/nvif/os.h:8:
   In file included from include/linux/pci.h:1660:
   In file included from include/linux/dmapool.h:14:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2224:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nouveau_svm.c:612:54: error: use of undeclared identifier 'folio'
     612 |                 page = make_device_exclusive(mm, start, drm->dev, &folio);
         |                                                                    ^
   3 warnings and 1 error generated.


vim +/folio +612 drivers/gpu/drm/nouveau/nouveau_svm.c

   584	
   585	static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
   586				       struct nouveau_drm *drm,
   587				       struct nouveau_pfnmap_args *args, u32 size,
   588				       struct svm_notifier *notifier)
   589	{
   590		unsigned long timeout =
   591			jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
   592		struct mm_struct *mm = svmm->notifier.mm;
   593		struct page *page;
   594		unsigned long start = args->p.addr;
   595		unsigned long notifier_seq;
   596		int ret = 0;
   597	
   598		ret = mmu_interval_notifier_insert(&notifier->notifier, mm,
   599						args->p.addr, args->p.size,
   600						&nouveau_svm_mni_ops);
   601		if (ret)
   602			return ret;
   603	
   604		while (true) {
   605			if (time_after(jiffies, timeout)) {
   606				ret = -EBUSY;
   607				goto out;
   608			}
   609	
   610			notifier_seq = mmu_interval_read_begin(&notifier->notifier);
   611			mmap_read_lock(mm);
 > 612			page = make_device_exclusive(mm, start, drm->dev, &folio);
   613			mmap_read_unlock(mm);
   614			if (IS_ERR(page)) {
   615				ret = -EINVAL;
   616				goto out;
   617			}
   618	
   619			mutex_lock(&svmm->mutex);
   620			if (!mmu_interval_read_retry(&notifier->notifier,
   621						     notifier_seq))
   622				break;
   623			mutex_unlock(&svmm->mutex);
   624		}
   625	
   626		/* Map the page on the GPU. */
   627		args->p.page = 12;
   628		args->p.size = PAGE_SIZE;
   629		args->p.addr = start;
   630		args->p.phys[0] = page_to_phys(page) |
   631			NVIF_VMM_PFNMAP_V0_V |
   632			NVIF_VMM_PFNMAP_V0_W |
   633			NVIF_VMM_PFNMAP_V0_A |
   634			NVIF_VMM_PFNMAP_V0_HOST;
   635	
   636		ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, size, NULL);
   637		mutex_unlock(&svmm->mutex);
   638	
   639		unlock_page(page);
   640		put_page(page);
   641	
   642	out:
   643		mmu_interval_notifier_remove(&notifier->notifier);
   644		return ret;
   645	}
   646	

-- 
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:[~2025-02-12  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12  8:57 [davidhildenbrand:device_exclusive 3/18] drivers/gpu/drm/nouveau/nouveau_svm.c:612:54: error: use of undeclared identifier 'folio' 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.