[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'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@xxxxxxxxx/

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@xxxxxxxxxxxxx>
:::::: CC: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>

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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux