[RFC PATCH 7/8] acpi: srat: cxl: Skip zero length CXL fixed memory windows.

Yuquan Wang wangyuquan1236 at phytium.com.cn
Thu Aug 1 00:55:15 PDT 2024


On Wed, May 29, 2024 at 06:12:35PM +0100, Jonathan Cameron wrote:
> One reported platform uses this nonsensical entry to represent
> a disable CFWMS. The acpi_cxl driver already correctly errors
> out on seeing this, but that leaves an additional confusing node
> in /sys/devices/system/nodes/possible plus wastes some space.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
> ---
>  drivers/acpi/numa/srat.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
> index e3f26e71637a..28c963d5c51f 100644
> --- a/drivers/acpi/numa/srat.c
> +++ b/drivers/acpi/numa/srat.c
> @@ -329,6 +329,11 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
>  	int node;
>  
>  	cfmws = (struct acpi_cedt_cfmws *)header;
> +
> +	/* At least one firmware reports disabled entries with size 0 */
> +	if (cfmws->window_size == 0)
> +		return 0;
> +
>  	start = cfmws->base_hpa;
>  	end = cfmws->base_hpa + cfmws->window_size;
>  
> -- 
> 2.39.2
>

Tested-off-by: Yuquan Wang <wangyuquan1236 at phytium.com.cn>




More information about the linux-arm-kernel mailing list