Re: [RFC PATCH 3/9] cxl/mem: Add a driver for the type-3 mailbox

From: Randy Dunlap
Date: Wed Nov 11 2020 - 01:17:22 EST


Hi,

On 11/10/20 9:43 PM, Ben Widawsky wrote:
> ---
> drivers/cxl/Kconfig | 20 +++++++++++
> drivers/cxl/Makefile | 2 ++
> drivers/cxl/mem.c | 82 ++++++++++++++++++++++++++++++++++++++++++++
> drivers/cxl/pci.h | 15 ++++++++
> 4 files changed, 119 insertions(+)

> diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig
> index dd724bd364df..15548f5c77ff 100644
> --- a/drivers/cxl/Kconfig
> +++ b/drivers/cxl/Kconfig
> @@ -27,4 +27,24 @@ config CXL_ACPI
> resources described by the CEDT (CXL Early Discovery Table)
>
> Say 'y' to enable CXL (Compute Express Link) drivers.
> +
> +config CXL_MEM
> + tristate "CXL.mem Device Support"
> + depends on PCI && CXL_BUS_PROVIDER != n
> + default m if CXL_BUS_PROVIDER

The "if CXL_BUS_PROVIDER" should be redundant due to the "depends on" clause.
However, having any default or 'm' or 'y' needs to be justified.

> + help
> + The CXL.mem protocol allows a device to act as a provider of
> + "System RAM" and/or "Persistent Memory" that is fully coherent
> + as if the memory was attached to the typical CPU memory
> + controller.
> +
> + Say 'y/m' to enable a driver named "cxl_mem.ko" that will attach

The builtin driver will not be named cxl-mem.ko.

> + to CXL.mem devices for configuration, provisioning, and health
> + monitoring, the so called "type-3 mailbox". Note, this driver
> + is required for dynamic provisioning of CXL.mem attached
> + memory, a pre-requisite for persistent memory support, but

prerequisite

> + devices that provide volatile memory may be fully described by
> + existing platform firmware memory enumeration.
> +
> + If unsure say 'n'.
> endif


--
~Randy