Message ID | 20240529171236.32002-8-Jonathan.Cameron@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64/memblock: Handling of CXL Fixed Memory Windows. | expand |
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@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@phytium.com.cn>
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;
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@huawei.com> --- drivers/acpi/numa/srat.c | 5 +++++ 1 file changed, 5 insertions(+)