[drm-misc:drm-misc-next 12/14] drivers/gpu/drm/panthor/panthor_device.c:355:31: error: implicit declaration of function 'virt_to_pfn'; did you mean 'virt_to_kpte'?

kernel test robot lkp at intel.com
Sun Mar 3 03:36:47 UTC 2024


Hi Boris,

First bad commit (maybe != root cause):

tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head:   216c1282dde38ca87ebdf1ccacee5a0682901574
commit: d72f049087d4f973f6332b599c92177e718107de [12/14] drm/panthor: Allow driver compilation
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20240303/202403031142.Vl4pW7X6-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240303/202403031142.Vl4pW7X6-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/202403031142.Vl4pW7X6-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/panthor/panthor_device.c: In function 'panthor_mmio_vm_fault':
>> drivers/gpu/drm/panthor/panthor_device.c:355:31: error: implicit declaration of function 'virt_to_pfn'; did you mean 'virt_to_kpte'? [-Werror=implicit-function-declaration]
     355 |                         pfn = virt_to_pfn(ptdev->pm.dummy_latest_flush);
         |                               ^~~~~~~~~~~
         |                               virt_to_kpte
   cc1: some warnings being treated as errors


vim +355 drivers/gpu/drm/panthor/panthor_device.c

5fe909cae118a7 Boris Brezillon 2024-02-29  332  
5fe909cae118a7 Boris Brezillon 2024-02-29  333  static vm_fault_t panthor_mmio_vm_fault(struct vm_fault *vmf)
5fe909cae118a7 Boris Brezillon 2024-02-29  334  {
5fe909cae118a7 Boris Brezillon 2024-02-29  335  	struct vm_area_struct *vma = vmf->vma;
5fe909cae118a7 Boris Brezillon 2024-02-29  336  	struct panthor_device *ptdev = vma->vm_private_data;
5fe909cae118a7 Boris Brezillon 2024-02-29  337  	u64 id = (u64)vma->vm_pgoff << PAGE_SHIFT;
5fe909cae118a7 Boris Brezillon 2024-02-29  338  	unsigned long pfn;
5fe909cae118a7 Boris Brezillon 2024-02-29  339  	pgprot_t pgprot;
5fe909cae118a7 Boris Brezillon 2024-02-29  340  	vm_fault_t ret;
5fe909cae118a7 Boris Brezillon 2024-02-29  341  	bool active;
5fe909cae118a7 Boris Brezillon 2024-02-29  342  	int cookie;
5fe909cae118a7 Boris Brezillon 2024-02-29  343  
5fe909cae118a7 Boris Brezillon 2024-02-29  344  	if (!drm_dev_enter(&ptdev->base, &cookie))
5fe909cae118a7 Boris Brezillon 2024-02-29  345  		return VM_FAULT_SIGBUS;
5fe909cae118a7 Boris Brezillon 2024-02-29  346  
5fe909cae118a7 Boris Brezillon 2024-02-29  347  	mutex_lock(&ptdev->pm.mmio_lock);
5fe909cae118a7 Boris Brezillon 2024-02-29  348  	active = atomic_read(&ptdev->pm.state) == PANTHOR_DEVICE_PM_STATE_ACTIVE;
5fe909cae118a7 Boris Brezillon 2024-02-29  349  
5fe909cae118a7 Boris Brezillon 2024-02-29  350  	switch (panthor_device_mmio_offset(id)) {
5fe909cae118a7 Boris Brezillon 2024-02-29  351  	case DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET:
5fe909cae118a7 Boris Brezillon 2024-02-29  352  		if (active)
5fe909cae118a7 Boris Brezillon 2024-02-29  353  			pfn = __phys_to_pfn(ptdev->phys_addr + CSF_GPU_LATEST_FLUSH_ID);
5fe909cae118a7 Boris Brezillon 2024-02-29  354  		else
5fe909cae118a7 Boris Brezillon 2024-02-29 @355  			pfn = virt_to_pfn(ptdev->pm.dummy_latest_flush);
5fe909cae118a7 Boris Brezillon 2024-02-29  356  		break;
5fe909cae118a7 Boris Brezillon 2024-02-29  357  
5fe909cae118a7 Boris Brezillon 2024-02-29  358  	default:
5fe909cae118a7 Boris Brezillon 2024-02-29  359  		ret = VM_FAULT_SIGBUS;
5fe909cae118a7 Boris Brezillon 2024-02-29  360  		goto out_unlock;
5fe909cae118a7 Boris Brezillon 2024-02-29  361  	}
5fe909cae118a7 Boris Brezillon 2024-02-29  362  
5fe909cae118a7 Boris Brezillon 2024-02-29  363  	pgprot = vma->vm_page_prot;
5fe909cae118a7 Boris Brezillon 2024-02-29  364  	if (active)
5fe909cae118a7 Boris Brezillon 2024-02-29  365  		pgprot = pgprot_noncached(pgprot);
5fe909cae118a7 Boris Brezillon 2024-02-29  366  
5fe909cae118a7 Boris Brezillon 2024-02-29  367  	ret = vmf_insert_pfn_prot(vma, vmf->address, pfn, pgprot);
5fe909cae118a7 Boris Brezillon 2024-02-29  368  
5fe909cae118a7 Boris Brezillon 2024-02-29  369  out_unlock:
5fe909cae118a7 Boris Brezillon 2024-02-29  370  	mutex_unlock(&ptdev->pm.mmio_lock);
5fe909cae118a7 Boris Brezillon 2024-02-29  371  	drm_dev_exit(cookie);
5fe909cae118a7 Boris Brezillon 2024-02-29  372  	return ret;
5fe909cae118a7 Boris Brezillon 2024-02-29  373  }
5fe909cae118a7 Boris Brezillon 2024-02-29  374  

:::::: The code at line 355 was first introduced by commit
:::::: 5fe909cae118a757a77afb37174b99436a36d2e2 drm/panthor: Add the device logical block

:::::: TO: Boris Brezillon <boris.brezillon at collabora.com>
:::::: CC: Boris Brezillon <boris.brezillon at collabora.com>

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


More information about the dri-devel mailing list