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

From: Alex Williamson

Date: Wed Nov 04 2026 - 19:27:48 EST


On Fri, 16 Oct 2026 21:48:10 +0530
<mhonap@xxxxxxxxxx> wrote:
> diff --git a/include/uapi/cxl/cxl_regs.h b/include/uapi/cxl/cxl_regs.h
> new file mode 100644
> index 000000000000..276f9361c840
> --- /dev/null
> +++ b/include/uapi/cxl/cxl_regs.h
> @@ -0,0 +1,56 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +/* Copyright (c) 2026 NVIDIA Corporation & Affiliates */
> +
> +#ifndef _UAPI_CXL_REGS_H_
> +#define _UAPI_CXL_REGS_H_
> +
> +#include <linux/bits.h>
> +#include <linux/const.h>
> +
> +/* CXL r4.0 sec 8.2.3 Component Register Layout and Definition */
> +#define CXL_COMPONENT_REG_BLOCK_SIZE 0x10000
> +
> +/* CXL r4.0 sec 8.2.4 CXL.cache and CXL.mem Registers */
> +#define CXL_CM_OFFSET 0x1000
> +#define CXL_CM_CAP_HDR_OFFSET 0x0
> +#define CXL_CM_CAP_HDR_ID_MASK __GENMASK(15, 0)

A local sashiko review asks if this new uapi header should include
asm/bitsperlong.h since __GENMASK requires __BITS_PER_LONG. We include
the other two header dependencies, but not this one, so it's a bit
self-inconsistent.

BTW, current guidance on the Assisted-by tag: 1e035297ffda ("docs:
remove Assisted-by references"). Thanks,

Alex