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: <515a4fe3-9905-a7b7-c666-216c60069701@intel.com>
Date:   Thu, 22 Jun 2023 17:01:57 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     Terry Bowman <terry.bowman@....com>, <alison.schofield@...el.com>,
        <vishal.l.verma@...el.com>, <ira.weiny@...el.com>,
        <bwidawsk@...nel.org>, <dan.j.williams@...el.com>,
        <Jonathan.Cameron@...wei.com>, <linux-cxl@...r.kernel.org>
CC:     <rrichter@....com>, <linux-kernel@...r.kernel.org>,
        <bhelgaas@...gle.com>
Subject: Re: [PATCH v6 16/27] cxl/port: Store the downstream port's Component
 Register mappings in struct cxl_dport



On 6/21/23 20:51, Terry Bowman wrote:
> From: Robert Richter <rrichter@....com>
> 
> Same as for ports, also store the downstream port's Component Register
> mappings, use struct cxl_dport for that.
> 
> Signed-off-by: Robert Richter <rrichter@....com>
> Signed-off-by: Terry Bowman <terry.bowman@....com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>

Reviewed-by: Dave Jiang <dave.jiang@...el.com>
> ---
>   drivers/cxl/core/port.c | 11 +++++++++++
>   drivers/cxl/cxl.h       |  2 ++
>   2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index 2e239fd33df9..45fe7d89f7f3 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -710,6 +710,13 @@ static inline int cxl_port_setup_regs(struct cxl_port *port,
>   				   component_reg_phys);
>   }
>   
> +static inline int cxl_dport_setup_regs(struct cxl_dport *dport,
> +				       resource_size_t component_reg_phys)
> +{
> +	return cxl_setup_comp_regs(dport->dport_dev, &dport->comp_map,
> +				   component_reg_phys);
> +}
> +
>   static struct cxl_port *__devm_cxl_add_port(struct device *host,
>   					    struct device *uport_dev,
>   					    resource_size_t component_reg_phys,
> @@ -988,6 +995,10 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
>   	dport->port_id = port_id;
>   	dport->port = port;
>   
> +	rc = cxl_dport_setup_regs(dport, component_reg_phys);
> +	if (rc)
> +		return ERR_PTR(rc);
> +
>   	cond_cxl_root_lock(port);
>   	rc = add_dport(port, dport);
>   	cond_cxl_root_unlock(port);
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index 37fa5b565362..b1adca9b27ba 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -595,6 +595,7 @@ struct cxl_rcrb_info {
>   /**
>    * struct cxl_dport - CXL downstream port
>    * @dport_dev: PCI bridge or firmware device representing the downstream link
> + * @comp_map: component register capability mappings
>    * @port_id: unique hardware identifier for dport in decoder target list
>    * @rcrb: Data about the Root Complex Register Block layout
>    * @rch: Indicate whether this dport was enumerated in RCH or VH mode
> @@ -602,6 +603,7 @@ struct cxl_rcrb_info {
>    */
>   struct cxl_dport {
>   	struct device *dport_dev;
> +	struct cxl_register_map comp_map;
>   	int port_id;
>   	struct cxl_rcrb_info rcrb;
>   	bool rch;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ