linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Joerg Roedel <jroedel@suse.de>, Kevin Tian <kevin.tian@intel.com>,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: [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
Date: Thu, 15 Aug 2024 06:09:27 +0800	[thread overview]
Message-ID: <202408150626.4kndgpL3-lkp@intel.com> (raw)

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


             reply	other threads:[~2024-08-14 22:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 22:09 kernel test robot [this message]
2024-08-28 14:51 ` Konrad Dybcio
2024-08-28 16:28   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408150626.4kndgpL3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=jgg@nvidia.com \
    --cc=jroedel@suse.de \
    --cc=kevin.tian@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox