linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 4179/4667] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations
@ 2024-08-14 22:09 kernel test robot
  2024-08-28 14:51 ` Konrad Dybcio
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-08-14 22:09 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Joerg Roedel,
	Kevin Tian, Lu Baolu

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   320eb81df4f6c1a1814fd02ebb4ba41eb80a3c7e
commit: 2665d975db35f124d47e9584d448a3fb4d54f225 [4179/4667] iommu: Allow ATS to work on VFs when the PF uses IDENTITY
config: arm64-randconfig-003-20240815 (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-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/202408150626.4kndgpL3-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:15:
   In file included from include/linux/crash_dump.h:5:
   In file included from include/linux/kexec.h:18:
   In file included from include/linux/vmcore_info.h:6:
   In file included from include/linux/elfcore.h:11:
   In file included from include/linux/ptrace.h:10:
   In file included from include/linux/pid_namespace.h:7:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    3301 |                 pci_prepare_ats(to_pci_dev(dev), stu);
         |                 ^
   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: note: did you mean 'pci_enable_ats'?
   include/linux/pci-ats.h:18:19: note: 'pci_enable_ats' declared here
      18 | static inline int pci_enable_ats(struct pci_dev *d, int ps)
         |                   ^
   1 warning and 1 error generated.


vim +/pci_prepare_ats +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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-next:master 4179/4667] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations
  2024-08-14 22:09 [linux-next:master 4179/4667] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2024-08-28 14:51 ` Konrad Dybcio
  2024-08-28 16:28   ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2024-08-28 14:51 UTC (permalink / raw)
  To: kernel test robot, Jason Gunthorpe
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Joerg Roedel,
	Kevin Tian, Lu Baolu

On 15.08.2024 12:09 AM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   320eb81df4f6c1a1814fd02ebb4ba41eb80a3c7e
> commit: 2665d975db35f124d47e9584d448a3fb4d54f225 [4179/4667] iommu: Allow ATS to work on VFs when the PF uses IDENTITY
> config: arm64-randconfig-003-20240815 (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-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/202408150626.4kndgpL3-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:15:
>    In file included from include/linux/crash_dump.h:5:
>    In file included from include/linux/kexec.h:18:
>    In file included from include/linux/vmcore_info.h:6:
>    In file included from include/linux/elfcore.h:11:
>    In file included from include/linux/ptrace.h:10:
>    In file included from include/linux/pid_namespace.h:7:
>    In file included from include/linux/mm.h:2228:
>    include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
>      514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
>>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>     3301 |                 pci_prepare_ats(to_pci_dev(dev), stu);
>          |                 ^
>    drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: note: did you mean 'pci_enable_ats'?
>    include/linux/pci-ats.h:18:19: note: 'pci_enable_ats' declared here
>       18 | static inline int pci_enable_ats(struct pci_dev *d, int ps)
>          |                   ^
>    1 warning and 1 error generated.
> 
> 
> vim +/pci_prepare_ats +3301 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Hi, this is still an issue on next-20240826

Konrad


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-next:master 4179/4667] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations
  2024-08-28 14:51 ` Konrad Dybcio
@ 2024-08-28 16:28   ` Jason Gunthorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2024-08-28 16:28 UTC (permalink / raw)
  To: Konrad Dybcio, Joerg Roedel
  Cc: kernel test robot, llvm, oe-kbuild-all,
	Linux Memory Management List, Kevin Tian, Lu Baolu

On Wed, Aug 28, 2024 at 04:51:33PM +0200, Konrad Dybcio wrote:
> On 15.08.2024 12:09 AM, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   320eb81df4f6c1a1814fd02ebb4ba41eb80a3c7e
> > commit: 2665d975db35f124d47e9584d448a3fb4d54f225 [4179/4667] iommu: Allow ATS to work on VFs when the PF uses IDENTITY
> > config: arm64-randconfig-003-20240815 (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-lkp@intel.com/config)
> > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240815/202408150626.4kndgpL3-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/202408150626.4kndgpL3-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:15:
> >    In file included from include/linux/crash_dump.h:5:
> >    In file included from include/linux/kexec.h:18:
> >    In file included from include/linux/vmcore_info.h:6:
> >    In file included from include/linux/elfcore.h:11:
> >    In file included from include/linux/ptrace.h:10:
> >    In file included from include/linux/pid_namespace.h:7:
> >    In file included from include/linux/mm.h:2228:
> >    include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> >      514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> >          |                               ~~~~~~~~~~~ ^ ~~~
> >>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> >     3301 |                 pci_prepare_ats(to_pci_dev(dev), stu);
> >          |                 ^
> >    drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: note: did you mean 'pci_enable_ats'?
> >    include/linux/pci-ats.h:18:19: note: 'pci_enable_ats' declared here
> >       18 | static inline int pci_enable_ats(struct pci_dev *d, int ps)
> >          |                   ^
> >    1 warning and 1 error generated.
> > 
> > 
> > vim +/pci_prepare_ats +3301 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> 
> Hi, this is still an issue on next-20240826

https://patch.msgid.link/r/0-v1-3ff295fa1528+d7-pci_prepare_ats_proto_jgg@nvidia.com

Joerg?

Jason


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-28 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14 22:09 [linux-next:master 4179/4667] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3301:3: error: call to undeclared function 'pci_prepare_ats'; ISO C99 and later do not support implicit function declarations kernel test robot
2024-08-28 14:51 ` Konrad Dybcio
2024-08-28 16:28   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox