Re: [PATCH v13 01/25] CXL/PCI: Move CXL DVSEC definitions into uapi/linux/pci_regs.h
From: Bjorn Helgaas
Date: Fri Dec 05 2025 - 20:56:14 EST
On Fri, Dec 05, 2025 at 04:41:40PM -0800, dan.j.williams@xxxxxxxxx wrote:
> Bjorn Helgaas wrote:
> > On Mon, Nov 03, 2025 at 06:09:37PM -0600, Terry Bowman wrote:
> > > The CXL DVSECs are currently defined in cxl/core/cxlpci.h. These are not
> > > accessible to other subsystems. Move these to uapi/linux/pci_regs.h.
> > > +#define PCI_DVSEC_HEADER1_LENGTH_MASK __GENMASK(31, 20)
> >
> > Looks like a functional duplicate of PCI_DVSEC_HEADER1_LEN().
> >
> > Why __GENMASK() instead of GENMASK()? I don't know the purpose of
> > __GENMASK(), but I see other include/uapi/ files using GENMASK().
> > Maybe they're wrong?
> >
> > Same questions for _BITUL() below.
>
> See this commit:
>
> 3c7a8e190bc5 uapi: introduce uapi-friendly macros for GENMASK
>
> GENMASK() for a long time was not available to uapi headers since uapi
> headers can only include other include/uapi/ headers, not
> include/linux/. That commit made some common kernel bitfield helpers
> finally available to the uapi side of the house.
So are the uses I see here wrong?
git grep "\<GENMASK\|\<BIT\>" include/uapi/