Re: [PATCH 16/18] cxl: Move reading of CDAT data from device to after media is ready

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 06, 2023 at 01:51:46PM -0700, Dave Jiang wrote:
> --- a/drivers/cxl/port.c
> +++ b/drivers/cxl/port.c
> @@ -109,6 +106,8 @@ static int cxl_port_probe(struct device *dev)
>  			return rc;
>  		}
>  
> +		/* Cache the data early to ensure is_visible() works */
> +		read_cdat_data(port);
>  		if (port->cdat.table) {
>  			rc = cdat_table_parse_dsmas(port->cdat.table,
>  						    cxl_dsmas_parse_entry,

Which branch is this patch based on?  I'm not seeing a function
called cdat_table_parse_dsmas() in cxl/next.

cxl_cdat_read_table() could be amended with a switch/case ladder
which compares entry->type to acpi_cdat_type values and stores
a pointer to an entry of interest e.g. in port->cdat->dsmas.
Then you can use that pointer directly to find the dsmas in the
CDAT and parse it.

Note however that cxl_cdat_read_table() is refactored heavily by
my DOE rework series (will submit v3 later this week):

https://github.com/l1k/linux/commits/doe

Thanks,

Lukas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux