public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
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;


  reply	other threads:[~2026-02-24 16:09 UTC|newest]

Thread overview: 21+ 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 ` [PATCH 01/37] PCI/MSI: Add Devres managed IRQ vectors allocation Shawn Lin
2026-02-24  0:04   ` Jakub Kicinski
2026-02-24  2:08     ` Shawn Lin
2026-02-24  7:47       ` Philipp Stanner
2026-02-24  8:21         ` Shawn Lin
2026-02-24  8:32           ` Philipp Stanner
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:50 ` [PATCH 0/37] PCI/MSI: Enforce explicit IRQ vector management by removing devres auto-free Andy Shevchenko
2026-02-23 16:09   ` Shawn Lin
2026-02-23 17:38     ` Andy Shevchenko
2026-02-24  2:29       ` Shawn Lin
2026-02-23 15:52 ` [PATCH 19/37] cxl/pci: Replace pci_alloc_irq_vectors() with pcim_alloc_irq_vectors() Shawn Lin
2026-02-24 16:09   ` Jonathan Cameron [this message]
2026-03-02  1:54   ` Davidlohr Bueso
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  7:39   ` Philipp Stanner
2026-02-24  9:12     ` Andy Shevchenko
2026-02-24 10:30       ` Philipp Stanner
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox