From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
<linux-cxl@vger.kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Philipp Stanner <phasta@kernel.org>, <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 19/37] cxl/pci: Replace pci_alloc_irq_vectors() with pcim_alloc_irq_vectors()
Date: Tue, 24 Feb 2026 16:09:40 +0000 [thread overview]
Message-ID: <20260224160940.0000336c@huawei.com> (raw)
In-Reply-To: <1771861967-88542-1-git-send-email-shawn.lin@rock-chips.com>
On Mon, 23 Feb 2026 23:52:47 +0800
Shawn Lin <shawn.lin@rock-chips.com> wrote:
> pcim_enable_device() no longer automatically manages IRQ vectors via devres.
> Drivers must now manually call pci_free_irq_vectors() for cleanup. Alternatively,
> pcim_alloc_irq_vectors() should be used.
>
> To: Davidlohr Bueso <dave@stgolabs.net>
> To: Jonathan Cameron <jonathan.cameron@huawei.com>
> To: Dave Jiang <dave.jiang@intel.com>
> To: Alison Schofield <alison.schofield@intel.com>
> To: Vishal Verma <vishal.l.verma@intel.com>
> To: Ira Weiny <ira.weiny@intel.com>
> To: Dan Williams <dan.j.williams@intel.com>
> Cc: linux-cxl@vger.kernel.org
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Philipp Stanner <phasta@kernel.org>
> Cc: linux-pci@vger.kernel.org
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
I am very much in favor of this change.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> ---
>
> drivers/cxl/pci.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index fbb300a..de5c9ff 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -565,13 +565,9 @@ static bool cxl_alloc_irq_vectors(struct pci_dev *pdev)
> * Per CXL 3.0 3.1.1 CXL.io Endpoint a function on a CXL device must
> * not generate INTx messages if that function participates in
> * CXL.cache or CXL.mem.
> - *
> - * Additionally pci_alloc_irq_vectors() handles calling
> - * pci_free_irq_vectors() automatically despite not being called
> - * pcim_*. See pci_setup_msi_context().
> */
> - nvecs = pci_alloc_irq_vectors(pdev, 1, CXL_PCI_DEFAULT_MAX_VECTORS,
> - PCI_IRQ_MSIX | PCI_IRQ_MSI);
> + nvecs = pcim_alloc_irq_vectors(pdev, 1, CXL_PCI_DEFAULT_MAX_VECTORS,
> + PCI_IRQ_MSIX | PCI_IRQ_MSI);
> if (nvecs < 1) {
> dev_dbg(&pdev->dev, "Failed to alloc irq vectors: %d\n", nvecs);
> return false;
next prev parent reply other threads:[~2026-02-24 16:09 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 15:29 [PATCH 0/37] PCI/MSI: Enforce explicit IRQ vector management by removing devres auto-free Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-23 15:29 ` [PATCH 01/37] PCI/MSI: Add Devres managed IRQ vectors allocation Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-24 0:04 ` Jakub Kicinski
2026-02-24 0:04 ` Jakub Kicinski
2026-02-24 0:04 ` Jakub Kicinski
2026-02-24 2:08 ` Shawn Lin
2026-02-24 2:08 ` Shawn Lin
2026-02-24 2:08 ` Shawn Lin
2026-02-24 7:47 ` Philipp Stanner
2026-02-24 7:47 ` Philipp Stanner
2026-02-24 7:47 ` Philipp Stanner
2026-02-24 8:21 ` Shawn Lin
2026-02-24 8:21 ` Shawn Lin
2026-02-24 8:21 ` Shawn Lin
2026-02-24 8:32 ` Philipp Stanner
2026-02-24 8:32 ` Philipp Stanner
2026-02-24 8:32 ` Philipp Stanner
2026-02-24 10:58 ` kernel test robot
2026-02-24 16:20 ` Jonathan Cameron
2026-02-24 16:20 ` Jonathan Cameron
2026-02-24 16:20 ` Jonathan Cameron
2026-02-23 15:29 ` [PATCH 37/37] PCI/MSI: Only check is_msi_managed in pcim_setup_msi_release() Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-23 15:29 ` Shawn Lin
2026-02-23 15:41 ` [PATCH 02/37] mmc: cavium: Replace pci_alloc_irq_vectors() with pcim_alloc_irq_vectors() Shawn Lin
2026-02-23 15:42 ` [PATCH 03/37] media: ipu6: " Shawn Lin
2026-02-23 15:42 ` [PATCH 04/37] gpio: merrifield: " Shawn Lin
2026-02-23 17:42 ` Andy Shevchenko
2026-02-24 2:16 ` Shawn Lin
2026-02-23 15:43 ` [PATCH 05/37] PCI: switchtec: " Shawn Lin
2026-02-23 15:43 ` [PATCH 06/37] PCI: vmd: " Shawn Lin
2026-02-23 15:44 ` [PATCH 07/37] spi: spi-pci1xxxx: " Shawn Lin
2026-02-23 15:44 ` [PATCH 08/37] spi: pxa2xx: " Shawn Lin
2026-02-23 15:47 ` [PATCH 09/37] i2c: amd-mp2: " Shawn Lin
2026-02-23 15:47 ` [PATCH 10/37] i2c: mchp-pci1xxxx: " Shawn Lin
2026-02-23 15:48 ` [PATCH 11/37] i2c: thunderx: " Shawn Lin
2026-02-23 15:48 ` [PATCH 12/37] i2c: designware: " Shawn Lin
2026-02-23 15:48 ` [PATCH 13/37] bus: mhi: host: " Shawn Lin
2026-02-23 15:49 ` [PATCH 14/37] serial: 8250_mid: " Shawn Lin
2026-02-23 15:49 ` [PATCH 15/37] serial: 8250_exar: " Shawn Lin
2026-02-23 15:50 ` [PATCH 16/37] platform/x86/intel: " Shawn Lin
2026-02-23 15:50 ` [PATCH 0/37] PCI/MSI: Enforce explicit IRQ vector management by removing devres auto-free Andy Shevchenko
2026-02-23 15:50 ` Andy Shevchenko
2026-02-23 15:50 ` Andy Shevchenko
2026-02-23 16:09 ` Shawn Lin
2026-02-23 16:09 ` Shawn Lin
2026-02-23 16:09 ` Shawn Lin
2026-02-23 17:38 ` Andy Shevchenko
2026-02-23 17:38 ` Andy Shevchenko
2026-02-23 17:38 ` Andy Shevchenko
2026-02-24 2:29 ` Shawn Lin
2026-02-24 2:29 ` Shawn Lin
2026-02-24 2:29 ` Shawn Lin
2026-02-23 15:51 ` [PATCH 17/37] crypto: safexcel: Replace pci_alloc_irq_vectors() with pcim_alloc_irq_vectors() Shawn Lin
2026-02-24 15:57 ` kernel test robot
2026-02-23 15:52 ` [PATCH 18/37] crypto: octeontx2: " Shawn Lin
2026-02-23 15:52 ` [PATCH 19/37] cxl/pci: " Shawn Lin
2026-02-24 16:09 ` Jonathan Cameron [this message]
2026-03-02 1:54 ` Davidlohr Bueso
2026-02-23 15:53 ` [PATCH 20/37] drm/hisilicon/hibmc: " Shawn Lin
2026-02-23 15:53 ` [PATCH 21/37] iommu/riscv: " Shawn Lin
2026-02-23 15:53 ` Shawn Lin
2026-02-23 15:54 ` [PATCH 22/37] thunderbolt: " Shawn Lin
2026-02-23 15:55 ` [PATCH 23/37] accel/amdxdna: " Shawn Lin
2026-02-23 15:55 ` [PATCH 24/37] accel/ivpu: " Shawn Lin
2026-02-23 15:55 ` [PATCH 25/37] accel/qaic: " Shawn Lin
2026-02-23 16:01 ` Jeff Hugo
2026-02-23 16:15 ` Shawn Lin
2026-02-23 16:25 ` Jeff Hugo
2026-02-24 7:35 ` Philipp Stanner
2026-02-23 15:56 ` [PATCH 26/37] net: stmmac: " Shawn Lin
2026-02-23 15:56 ` [PATCH 27/37] r8169: " Shawn Lin
2026-02-23 15:57 ` [PATCH 28/37] net: thunder_bgx: " Shawn Lin
2026-02-23 15:57 ` [PATCH 29/37] net: hibmcge: " Shawn Lin
2026-02-23 15:58 ` [PATCH 30/37] mfd: intel-lpss: " Shawn Lin
2026-02-23 15:58 ` [PATCH 31/37] dmaengine: hsu: " Shawn Lin
2026-02-23 15:58 ` [PATCH 32/37] dmaengine: hisilicon: " Shawn Lin
2026-02-23 15:58 ` [PATCH 33/37] i3c: mipi-i3c-hci-pci: " Shawn Lin
2026-02-23 15:58 ` Shawn Lin
2026-02-23 15:59 ` [PATCH 34/37] HID: intel-ish-ipc: " Shawn Lin
2026-02-23 15:59 ` [PATCH 35/37] HID: Intel-thc-hid: " Shawn Lin
2026-02-23 15:59 ` [PATCH 36/37] misc: microchip: pci1xxxx: " Shawn Lin
2026-02-24 4:14 ` [PATCH 0/37] PCI/MSI: Enforce explicit IRQ vector management by removing devres auto-free Simon Richter
2026-02-24 4:14 ` Simon Richter
2026-02-24 4:14 ` Simon Richter
2026-02-24 7:39 ` Philipp Stanner
2026-02-24 7:39 ` Philipp Stanner
2026-02-24 7:39 ` Philipp Stanner
2026-02-24 9:12 ` Andy Shevchenko
2026-02-24 9:12 ` Andy Shevchenko
2026-02-24 9:12 ` Andy Shevchenko
2026-02-24 10:30 ` Philipp Stanner
2026-02-24 10:30 ` Philipp Stanner
2026-02-24 10:30 ` Philipp Stanner
2026-02-24 10:39 ` Andy Shevchenko
2026-02-24 10:39 ` Andy Shevchenko
2026-02-24 10:39 ` Andy Shevchenko
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=20260224160940.0000336c@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=phasta@kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=vishal.l.verma@intel.com \
/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 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.