lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68840b6dbac3_134cc710045@dwillia2-xfh.jf.intel.com.notmuch>
Date: Fri, 25 Jul 2025 15:55:41 -0700
From: <dan.j.williams@...el.com>
To: <alejandro.lucero-palau@....com>, <linux-cxl@...r.kernel.org>,
	<netdev@...r.kernel.org>, <dan.j.williams@...el.com>, <edward.cree@....com>,
	<davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<edumazet@...gle.com>, <dave.jiang@...el.com>
CC: Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCH v17 04/22] cxl: allow Type2 drivers to map cxl component
 regs

alejandro.lucero-palau@ wrote:
> From: Alejandro Lucero <alucerop@....com>
> 
> Export cxl core functions for a Type2 driver being able to discover and
> map the device component registers.

I would squash this with patch5, up to Dave.

> Signed-off-by: Alejandro Lucero <alucerop@....com>
> ---
>  drivers/cxl/core/port.c |  1 +
>  drivers/cxl/cxl.h       |  7 -------
>  drivers/cxl/cxlpci.h    | 12 ------------
>  include/cxl/cxl.h       |  8 ++++++++
>  include/cxl/pci.h       | 15 +++++++++++++++
>  5 files changed, 24 insertions(+), 19 deletions(-)
> 
[..]
> diff --git a/include/cxl/cxl.h b/include/cxl/cxl.h
> index 9c1a82c8af3d..0810c18d7aef 100644
> --- a/include/cxl/cxl.h
> +++ b/include/cxl/cxl.h
> @@ -70,6 +70,10 @@ struct cxl_regs {
>  	);
>  };
>  
> +#define   CXL_CM_CAP_CAP_ID_RAS 0x2
> +#define   CXL_CM_CAP_CAP_ID_HDM 0x5
> +#define   CXL_CM_CAP_CAP_HDM_VERSION 1
> +
>  struct cxl_reg_map {
>  	bool valid;
>  	int id;
> @@ -223,4 +227,8 @@ struct cxl_dev_state *_devm_cxl_dev_state_create(struct device *dev,
>  		(drv_struct *)_devm_cxl_dev_state_create(parent, type, serial, dvsec,	\
>  						      sizeof(drv_struct), mbox);	\
>  	})
> +
> +int cxl_map_component_regs(const struct cxl_register_map *map,
> +			   struct cxl_component_regs *regs,
> +			   unsigned long map_mask);

With this function now becoming public it really wants some kdoc, and a
rename to add devm_ so that readers are not suprised by hidden devres
behavior behind this API.

It was ok previously because it was private to drivers/cxl/ where
everything is devres managed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ