Re: [PATCH v5 03/27] cxl: Move component register defines to uapi/cxl/cxl_regs.h

From: Jonathan Cameron

Date: Mon Sep 21 2026 - 21:44:07 EST


On Thu, 17 Sep 2026 00:05:16 +0530
<mhonap@xxxxxxxxxx> wrote:

> From: Manish Honap <mhonap@xxxxxxxxxx>
>
> The CXL component and HDM decoder register layout is spec-defined and is
> needed by a userspace consumer that cannot include the private
> drivers/cxl/cxl.h
>
> The vfio-cxl selftest
> (tools/testing/selftests/vfio/vfio_cxl_type2_test.c) builds against
> installed uapi headers only. Move those defines to a new uapi header, the
> way PCI register offsets live in uapi pci_regs.h, and include it from
> drivers/cxl/cxl.h so existing in-kernel users are unchanged.
>
> No functional change; the GENMASK and BIT forms are written as plain
> values as a uapi header requirement.

I thought we'd fixed that these days... And indeed we have
see include/uapi/linux/bits.h for __GENMASK()
and include/uapi/linux/const.h for _BITUL()

Both are in use in pci_regs.h for instance.

Jonathan