RE: [PATCH v4 01/27] cxl: Fix resource.c include path and export cxl_restore_hdm_after_pci_reset

From: Manish Honap

Date: Thu Sep 03 2026 - 07:58:41 EST




> -----Original Message-----
> From: Jonathan Cameron <jic23@xxxxxxxxxx>
> Sent: Saturday, August 22, 2026 4:23 AM
> To: Manish Honap <mhonap@xxxxxxxxxx>
> Cc: alex@xxxxxxxxxxx; jgg@xxxxxxxx; Ankit Agrawal <ankita@xxxxxxxxxx>;
> dave.jiang@xxxxxxxxx; alejandro.lucero-palau@xxxxxxx; Srirangan Madhavan
> <smadhavan@xxxxxxxxxx>; corbet@xxxxxxx; skhan@xxxxxxxxxxxxxxxxxxx;
> dave@xxxxxxxxxxxx; alison.schofield@xxxxxxxxx; vishal.l.verma@xxxxxxxxx;
> iweiny@xxxxxxxxxx; ming.li@xxxxxxxxxxxx; Yishai Hadas
> <yishaih@xxxxxxxxxx>; Shameer Kolothum Thodi
> <skolothumtho@xxxxxxxxxx>; kevin.tian@xxxxxxxxx; bhelgaas@xxxxxxxxxx;
> dmatlack@xxxxxxxxxx; kees@xxxxxxxxxx; gustavoars@xxxxxxxxxx; Neo Jia
> <cjia@xxxxxxxxxx>; Krishnakant Jaju <kjaju@xxxxxxxxxx>; Vikram Sethi
> <vsethi@xxxxxxxxxx>; Zhi Wang <zhiw@xxxxxxxxxx>; linux-
> doc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx;
> linux-cxl@xxxxxxxxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx; linux-
> kselftest@xxxxxxxxxxxxxxx; linux-hardening@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 01/27] cxl: Fix resource.c include path and export
> cxl_restore_hdm_after_pci_reset
>
> External email: Use caution opening links or attachments
>
>
> On Thu, 13 Aug 2026 15:06:05 +0530
> <mhonap@xxxxxxxxxx> wrote:
>
> > From: Manish Honap <mhonap@xxxxxxxxxx>
> >
> > The vfio-cxl Type-2 driver restores the endpoint HDM decoder after a
> > D3hot->D0 soft reset by calling cxl_restore_hdm_after_pci_reset(), so
> > export it to the CXL namespace. While here, correct the resource.c
> > include of the CXL PCI definitions from <cxlpci.h> to <cxl/pci.h>.
>
> Why? + if this makes sense (I haven't checked) please make that a separate
> patch (for now) + make sure to call it out in review of Srirangan Madhavan
> series where this file comes from and which hasn't merged yet. I think it is in
> patch 5.
>
> Jonathan
>

Dropping this patch in v5 series. On v7.3-rc1 + Srirangan's v11 series, resource.c
already includes <cxl/pci.h> and cxl_restore_hdm_after_pci_reset() is declared in the
public include/cxl/cxl.h, so there is nothing left for us to add here.

Manish
> >
> > Signed-off-by: Manish Honap <mhonap@xxxxxxxxxx>
> > ---
> > drivers/cxl/core/resource.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/cxl/core/resource.c b/drivers/cxl/core/resource.c
> > index daa5e7fa2509..492ffe8e3576 100644
> > --- a/drivers/cxl/core/resource.c
> > +++ b/drivers/cxl/core/resource.c
> > @@ -16,7 +16,7 @@
> > #include <linux/pci.h>
> > #include <linux/slab.h>
> >
> > -#include <cxlpci.h>
> > +#include <cxl/pci.h>
> >
> > #include "cxl.h"
> > #include "core.h"
> > @@ -850,6 +850,7 @@ int cxl_restore_hdm_after_pci_reset(struct pci_dev
> > *pdev)
> >
> > return cxl_reset_save_restored_state(pdev, command); }
> > +EXPORT_SYMBOL_NS_GPL(cxl_restore_hdm_after_pci_reset, "CXL");
> >
> > static void cxl_hdm_range_context_init(struct cxl_hdm_range_context *ctx)
> > {
>