From: kernel test robot <lkp@intel.com>
To: Nicolin Chen <nicolinc@nvidia.com>,
robin.murphy@arm.com, joro@8bytes.org, afael@kernel.org,
bhelgaas@google.com, alex@shazbot.org, jgg@nvidia.com,
kevin.tian@intel.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
will@kernel.org, lenb@kernel.org, baolu.lu@linux.intel.com,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-pci@vger.kernel.org, kvm@vger.kernel.org,
patches@lists.linux.dev, pjaroszynski@nvidia.com,
vsethi@nvidia.com, helgaas@kernel.org, etzhao1900@gmail.com
Subject: Re: [PATCH v6 5/5] PCI: Suspend iommu function prior to resetting a device
Date: Wed, 19 Nov 2025 10:29:43 +0800 [thread overview]
Message-ID: <202511191020.OczvlCww-lkp@intel.com> (raw)
In-Reply-To: <9f6caaedc278fe057aacb813d94f44a93d8cab3c.1763512374.git.nicolinc@nvidia.com>
Hi Nicolin,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20251118]
[cannot apply to pci/next pci/for-linus awilliam-vfio/next awilliam-vfio/for-linus rafael-pm/linux-next rafael-pm/bleeding-edge linus/master v6.18-rc6 v6.18-rc5 v6.18-rc4 v6.18-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nicolin-Chen/iommu-Lock-group-mutex-in-iommu_deferred_attach/20251119-085721
base: next-20251118
patch link: https://lore.kernel.org/r/9f6caaedc278fe057aacb813d94f44a93d8cab3c.1763512374.git.nicolinc%40nvidia.com
patch subject: [PATCH v6 5/5] PCI: Suspend iommu function prior to resetting a device
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251119/202511191020.OczvlCww-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 0bba1e76581bad04e7d7f09f5115ae5e2989e0d9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511191020.OczvlCww-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/202511191020.OczvlCww-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/pci/pci.c:4341:36: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4341 | ret = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci.c:4361:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4361 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
drivers/pci/pci.c:4418:36: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4418 | ret = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci.c:4439:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4439 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
drivers/pci/pci.c:4476:36: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4476 | ret = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci.c:4493:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4493 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
drivers/pci/pci.c:4922:35: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4922 | rc = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci.c:4934:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4934 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
drivers/pci/pci.c:4959:35: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4959 | rc = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci.c:4979:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4979 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
10 errors generated.
--
>> drivers/pci/pci-acpi.c:983:36: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
983 | ret = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/pci-acpi.c:994:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
994 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
2 errors generated.
--
>> drivers/pci/quirks.c:4237:36: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4237 | ret = pci_dev_reset_iommu_prepare(dev);
| ^~~
include/linux/iommu.h:1519:62: note: passing argument to parameter 'dev' here
1519 | static inline int pci_dev_reset_iommu_prepare(struct device *dev)
| ^
drivers/pci/quirks.c:4244:27: error: incompatible pointer types passing 'struct pci_dev *' to parameter of type 'struct device *' [-Wincompatible-pointer-types]
4244 | pci_dev_reset_iommu_done(dev);
| ^~~
include/linux/iommu.h:1524:60: note: passing argument to parameter 'dev' here
1524 | static inline void pci_dev_reset_iommu_done(struct device *dev)
| ^
2 errors generated.
vim +4341 drivers/pci/pci.c
4325
4326 /**
4327 * pcie_flr - initiate a PCIe function level reset
4328 * @dev: device to reset
4329 *
4330 * Initiate a function level reset unconditionally on @dev without
4331 * checking any flags and DEVCAP
4332 */
4333 int pcie_flr(struct pci_dev *dev)
4334 {
4335 int ret;
4336
4337 if (!pci_wait_for_pending_transaction(dev))
4338 pci_err(dev, "timed out waiting for pending transaction; performing function level reset anyway\n");
4339
4340 /* Have to call it after waiting for pending DMA transaction */
> 4341 ret = pci_dev_reset_iommu_prepare(dev);
4342 if (ret) {
4343 pci_err(dev, "failed to stop IOMMU for a PCI reset: %d\n", ret);
4344 return ret;
4345 }
4346
4347 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
4348
4349 if (dev->imm_ready)
4350 goto done;
4351
4352 /*
4353 * Per PCIe r4.0, sec 6.6.2, a device must complete an FLR within
4354 * 100ms, but may silently discard requests while the FLR is in
4355 * progress. Wait 100ms before trying to access the device.
4356 */
4357 msleep(100);
4358
4359 ret = pci_dev_wait(dev, "FLR", PCIE_RESET_READY_POLL_MS);
4360 done:
4361 pci_dev_reset_iommu_done(dev);
4362 return ret;
4363 }
4364 EXPORT_SYMBOL_GPL(pcie_flr);
4365
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-19 2:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 0:52 [PATCH v6 0/5] Disable ATS via iommu during PCI resets Nicolin Chen
2025-11-19 0:52 ` [PATCH v6 1/5] iommu: Lock group->mutex in iommu_deferred_attach() Nicolin Chen
2025-11-19 0:52 ` [PATCH v6 2/5] iommu: Tidy domain for iommu_setup_dma_ops() Nicolin Chen
2025-11-19 0:52 ` [PATCH v6 3/5] iommu: Add iommu_driver_get_domain_for_dev() helper Nicolin Chen
2025-11-19 0:52 ` [PATCH v6 4/5] iommu: Introduce pci_dev_reset_iommu_prepare/done() Nicolin Chen
2025-11-19 2:56 ` Nicolin Chen
2025-11-21 7:59 ` Tian, Kevin
2025-11-19 0:52 ` [PATCH v6 5/5] PCI: Suspend iommu function prior to resetting a device Nicolin Chen
2025-11-19 2:29 ` kernel test robot [this message]
2025-11-19 3:03 ` kernel test robot
2025-11-21 7:59 ` Tian, Kevin
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=202511191020.OczvlCww-lkp@intel.com \
--to=lkp@intel.com \
--cc=afael@kernel.org \
--cc=alex@shazbot.org \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=etzhao1900@gmail.com \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nicolinc@nvidia.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=patches@lists.linux.dev \
--cc=pjaroszynski@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=vsethi@nvidia.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).