[linux-next:master 3822/5190] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:17: error: implicit declaration of function 'pci_prepare_ats'; did you mean 'pci_enable_ats'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   367b5c3d53e57d51a5878816804652963da90950
commit: 2665d975db35f124d47e9584d448a3fb4d54f225 [3822/5190] iommu: Allow ATS to work on VFs when the PF uses IDENTITY
config: arm64-randconfig-004-20240817 (https://download.01.org/0day-ci/archive/20240817/202408170408.2bq7qYA8-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240817/202408170408.2bq7qYA8-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/202408170408.2bq7qYA8-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c: In function 'arm_smmu_probe_device':
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:17: error: implicit declaration of function 'pci_prepare_ats'; did you mean 'pci_enable_ats'? [-Wimplicit-function-declaration]
    3301 |                 pci_prepare_ats(to_pci_dev(dev), stu);
         |                 ^~~~~~~~~~~~~~~
         |                 pci_enable_ats


vim +3301 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

  3249	
  3250	static struct iommu_device *arm_smmu_probe_device(struct device *dev)
  3251	{
  3252		int ret;
  3253		struct arm_smmu_device *smmu;
  3254		struct arm_smmu_master *master;
  3255		struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
  3256	
  3257		if (WARN_ON_ONCE(dev_iommu_priv_get(dev)))
  3258			return ERR_PTR(-EBUSY);
  3259	
  3260		smmu = arm_smmu_get_by_fwnode(fwspec->iommu_fwnode);
  3261		if (!smmu)
  3262			return ERR_PTR(-ENODEV);
  3263	
  3264		master = kzalloc(sizeof(*master), GFP_KERNEL);
  3265		if (!master)
  3266			return ERR_PTR(-ENOMEM);
  3267	
  3268		master->dev = dev;
  3269		master->smmu = smmu;
  3270		dev_iommu_priv_set(dev, master);
  3271	
  3272		ret = arm_smmu_insert_master(smmu, master);
  3273		if (ret)
  3274			goto err_free_master;
  3275	
  3276		device_property_read_u32(dev, "pasid-num-bits", &master->ssid_bits);
  3277		master->ssid_bits = min(smmu->ssid_bits, master->ssid_bits);
  3278	
  3279		/*
  3280		 * Note that PASID must be enabled before, and disabled after ATS:
  3281		 * PCI Express Base 4.0r1.0 - 10.5.1.3 ATS Control Register
  3282		 *
  3283		 *   Behavior is undefined if this bit is Set and the value of the PASID
  3284		 *   Enable, Execute Requested Enable, or Privileged Mode Requested bits
  3285		 *   are changed.
  3286		 */
  3287		arm_smmu_enable_pasid(master);
  3288	
  3289		if (!(smmu->features & ARM_SMMU_FEAT_2_LVL_CDTAB))
  3290			master->ssid_bits = min_t(u8, master->ssid_bits,
  3291						  CTXDESC_LINEAR_CDMAX);
  3292	
  3293		if ((smmu->features & ARM_SMMU_FEAT_STALLS &&
  3294		     device_property_read_bool(dev, "dma-can-stall")) ||
  3295		    smmu->features & ARM_SMMU_FEAT_STALL_FORCE)
  3296			master->stall_enabled = true;
  3297	
  3298		if (dev_is_pci(dev)) {
  3299			unsigned int stu = __ffs(smmu->pgsize_bitmap);
  3300	
> 3301			pci_prepare_ats(to_pci_dev(dev), stu);
  3302		}
  3303	
  3304		return &smmu->iommu;
  3305	
  3306	err_free_master:
  3307		kfree(master);
  3308		return ERR_PTR(ret);
  3309	}
  3310	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux