All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 9350/14131] drivers/iommu/intel-svm.c:610:5: warning: no previous prototype for function 'intel_svm_unbind_mm'
@ 2020-05-29 17:58 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-29 17:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6293 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
commit: 064a57d7ddfc46ada02b477b91c478001b03bfa3 [9350/14131] iommu/vt-d: Replace intel SVM APIs with generic SVA APIs
config: x86_64-randconfig-a014-20200529 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2d068e534f1671459e1b135852c1b3c10502e929)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 064a57d7ddfc46ada02b477b91c478001b03bfa3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/intel-svm.c:610:5: warning: no previous prototype for function 'intel_svm_unbind_mm' [-Wmissing-prototypes]
int intel_svm_unbind_mm(struct device *dev, int pasid)
^
drivers/iommu/intel-svm.c:610:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int intel_svm_unbind_mm(struct device *dev, int pasid)
^
static
1 warning generated.

vim +/intel_svm_unbind_mm +610 drivers/iommu/intel-svm.c

2f26e0a9c9860d David Woodhouse 2015-09-09  608  
064a57d7ddfc46 Jacob Pan       2020-05-16  609  /* Caller must hold pasid_mutex */
2f26e0a9c9860d David Woodhouse 2015-09-09 @610  int intel_svm_unbind_mm(struct device *dev, int pasid)
2f26e0a9c9860d David Woodhouse 2015-09-09  611  {
2f26e0a9c9860d David Woodhouse 2015-09-09  612  	struct intel_svm_dev *sdev;
2f26e0a9c9860d David Woodhouse 2015-09-09  613  	struct intel_iommu *iommu;
2f26e0a9c9860d David Woodhouse 2015-09-09  614  	struct intel_svm *svm;
2f26e0a9c9860d David Woodhouse 2015-09-09  615  	int ret = -EINVAL;
2f26e0a9c9860d David Woodhouse 2015-09-09  616  
2f26e0a9c9860d David Woodhouse 2015-09-09  617  	iommu = intel_svm_device_to_iommu(dev);
4774cc5245700b Lu Baolu        2018-07-14  618  	if (!iommu)
2f26e0a9c9860d David Woodhouse 2015-09-09  619  		goto out;
2f26e0a9c9860d David Woodhouse 2015-09-09  620  
59a623374dc38f Jacob Pan       2020-01-02  621  	svm = ioasid_find(NULL, pasid, NULL);
2f26e0a9c9860d David Woodhouse 2015-09-09  622  	if (!svm)
2f26e0a9c9860d David Woodhouse 2015-09-09  623  		goto out;
2f26e0a9c9860d David Woodhouse 2015-09-09  624  
59a623374dc38f Jacob Pan       2020-01-02  625  	if (IS_ERR(svm)) {
59a623374dc38f Jacob Pan       2020-01-02  626  		ret = PTR_ERR(svm);
59a623374dc38f Jacob Pan       2020-01-02  627  		goto out;
59a623374dc38f Jacob Pan       2020-01-02  628  	}
59a623374dc38f Jacob Pan       2020-01-02  629  
034d473109e907 Jacob Pan       2020-01-02  630  	for_each_svm_dev(sdev, svm, dev) {
2f26e0a9c9860d David Woodhouse 2015-09-09  631  		ret = 0;
2f26e0a9c9860d David Woodhouse 2015-09-09  632  		sdev->users--;
2f26e0a9c9860d David Woodhouse 2015-09-09  633  		if (!sdev->users) {
2f26e0a9c9860d David Woodhouse 2015-09-09  634  			list_del_rcu(&sdev->list);
2f26e0a9c9860d David Woodhouse 2015-09-09  635  			/* Flush the PASID cache and IOTLB for this device.
2f26e0a9c9860d David Woodhouse 2015-09-09  636  			 * Note that we do depend on the hardware *not* using
2f26e0a9c9860d David Woodhouse 2015-09-09  637  			 * the PASID any more. Just as we depend on other
2f26e0a9c9860d David Woodhouse 2015-09-09  638  			 * devices never using PASIDs that they have no right
2f26e0a9c9860d David Woodhouse 2015-09-09  639  			 * to use. We have a *shared* PASID table, because it's
2f26e0a9c9860d David Woodhouse 2015-09-09  640  			 * large and has to be physically contiguous. So it's
2f26e0a9c9860d David Woodhouse 2015-09-09  641  			 * hard to be as defensive as we might like. */
1c4f88b7f1f929 Lu Baolu        2018-12-10  642  			intel_pasid_tear_down_entry(iommu, dev, svm->pasid);
8744daf4b0699b Jacob Pan       2019-08-26  643  			intel_flush_svm_range_dev(svm, sdev, 0, -1, 0);
2f26e0a9c9860d David Woodhouse 2015-09-09  644  			kfree_rcu(sdev, rcu);
2f26e0a9c9860d David Woodhouse 2015-09-09  645  
2f26e0a9c9860d David Woodhouse 2015-09-09  646  			if (list_empty(&svm->devs)) {
59a623374dc38f Jacob Pan       2020-01-02  647  				ioasid_free(svm->pasid);
5cec753709adf1 David Woodhouse 2015-10-15  648  				if (svm->mm)
e57e58bd390a68 David Woodhouse 2016-01-12  649  					mmu_notifier_unregister(&svm->notifier, svm->mm);
51261aac51a05c Lu Baolu        2018-07-14  650  				list_del(&svm->list);
2f26e0a9c9860d David Woodhouse 2015-09-09  651  				/* We mandate that no page faults may be outstanding
2f26e0a9c9860d David Woodhouse 2015-09-09  652  				 * for the PASID when intel_svm_unbind_mm() is called.
2f26e0a9c9860d David Woodhouse 2015-09-09  653  				 * If that is not obeyed, subtle errors will happen.
2f26e0a9c9860d David Woodhouse 2015-09-09  654  				 * Let's make them less subtle... */
2f26e0a9c9860d David Woodhouse 2015-09-09  655  				memset(svm, 0x6b, sizeof(*svm));
2f26e0a9c9860d David Woodhouse 2015-09-09  656  				kfree(svm);
2f26e0a9c9860d David Woodhouse 2015-09-09  657  			}
2f26e0a9c9860d David Woodhouse 2015-09-09  658  		}
2f26e0a9c9860d David Woodhouse 2015-09-09  659  		break;
2f26e0a9c9860d David Woodhouse 2015-09-09  660  	}
2f26e0a9c9860d David Woodhouse 2015-09-09  661   out:
2f26e0a9c9860d David Woodhouse 2015-09-09  662  
2f26e0a9c9860d David Woodhouse 2015-09-09  663  	return ret;
2f26e0a9c9860d David Woodhouse 2015-09-09  664  }
15060aba717115 CQ Tang         2017-05-10  665  

:::::: The code at line 610 was first introduced by commit
:::::: 2f26e0a9c9860db290d63e9d85c2c8c09813677f iommu/vt-d: Add basic SVM PASID support

:::::: TO: David Woodhouse <David.Woodhouse@intel.com>
:::::: CC: David Woodhouse <David.Woodhouse@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42914 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-29 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 17:58 [linux-next:master 9350/14131] drivers/iommu/intel-svm.c:610:5: warning: no previous prototype for function 'intel_svm_unbind_mm' kbuild 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.