* [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs
@ 2025-03-10 9:39 Yuquan Wang
2025-03-10 18:13 ` Alison Schofield
0 siblings, 1 reply; 3+ messages in thread
From: Yuquan Wang @ 2025-03-10 9:39 UTC (permalink / raw)
To: rafael, lenb, Jonathan.Cameron, dan.j.williams, alison.schofield,
rrichter, bfaccini, haibo1.xu, dave.jiang, rppt, gourry
Cc: linux-acpi, linux-kernel, linux-cxl, chenbaozi, Yuquan Wang
The absence of SRAT would cause the fake_pxm to be -1 and increment
to 0, then send to acpi_parse_cfmws(). If there exists CXL memory
ranges that are defined in the CFMWS and not already defined in the
SRAT, the new node (node0) for the CXL memory would be invalid, as
node0 is already in "used".
Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
---
drivers/acpi/numa/srat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
index 00ac0d7bb8c9..eb8628e217fa 100644
--- a/drivers/acpi/numa/srat.c
+++ b/drivers/acpi/numa/srat.c
@@ -646,6 +646,9 @@ int __init acpi_numa_init(void)
if (node_to_pxm_map[i] > fake_pxm)
fake_pxm = node_to_pxm_map[i];
}
+ if (fake_pxm == PXM_INVAL)
+ pr_warn("Failed to find the next unused PXM value for CFMWs\n");
+
last_real_pxm = fake_pxm;
fake_pxm++;
acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs
2025-03-10 9:39 [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs Yuquan Wang
@ 2025-03-10 18:13 ` Alison Schofield
2025-03-11 3:48 ` Yuquan Wang
0 siblings, 1 reply; 3+ messages in thread
From: Alison Schofield @ 2025-03-10 18:13 UTC (permalink / raw)
To: Yuquan Wang
Cc: rafael, lenb, Jonathan.Cameron, dan.j.williams, rrichter,
bfaccini, haibo1.xu, dave.jiang, rppt, gourry, linux-acpi,
linux-kernel, linux-cxl, chenbaozi
On Mon, Mar 10, 2025 at 05:39:10PM +0800, Yuquan Wang wrote:
> The absence of SRAT would cause the fake_pxm to be -1 and increment
> to 0, then send to acpi_parse_cfmws(). If there exists CXL memory
> ranges that are defined in the CFMWS and not already defined in the
> SRAT, the new node (node0) for the CXL memory would be invalid, as
> node0 is already in "used".
If no SRAT or bad SRAT, then all memory is at node:0, and first fake
node for CFMWs should start at 1. Right?
If so, might it be safest to always start the the CFMWS fake nodes at
at a minimum of node[1]. Maybe srat_disabled() can be used to decide.
>
> Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
> ---
> drivers/acpi/numa/srat.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
> index 00ac0d7bb8c9..eb8628e217fa 100644
> --- a/drivers/acpi/numa/srat.c
> +++ b/drivers/acpi/numa/srat.c
> @@ -646,6 +646,9 @@ int __init acpi_numa_init(void)
> if (node_to_pxm_map[i] > fake_pxm)
> fake_pxm = node_to_pxm_map[i];
> }
> + if (fake_pxm == PXM_INVAL)
> + pr_warn("Failed to find the next unused PXM value for CFMWs\n");
> +
How come it is sufficient to just warn?
As per my comment above, can we adjust?
> last_real_pxm = fake_pxm;
> fake_pxm++;
> acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs
2025-03-10 18:13 ` Alison Schofield
@ 2025-03-11 3:48 ` Yuquan Wang
0 siblings, 0 replies; 3+ messages in thread
From: Yuquan Wang @ 2025-03-11 3:48 UTC (permalink / raw)
To: Alison Schofield
Cc: rafael, lenb, Jonathan.Cameron, dan.j.williams, rrichter,
bfaccini, haibo1.xu, dave.jiang, rppt, gourry, linux-acpi,
linux-kernel, linux-cxl, chenbaozi
On Mon, Mar 10, 2025 at 11:13:32AM -0700, Alison Schofield wrote:
> On Mon, Mar 10, 2025 at 05:39:10PM +0800, Yuquan Wang wrote:
> > The absence of SRAT would cause the fake_pxm to be -1 and increment
> > to 0, then send to acpi_parse_cfmws(). If there exists CXL memory
> > ranges that are defined in the CFMWS and not already defined in the
> > SRAT, the new node (node0) for the CXL memory would be invalid, as
> > node0 is already in "used".
>
>
> If no SRAT or bad SRAT, then all memory is at node:0, and first fake
> node for CFMWs should start at 1. Right?
Yes.
>
> If so, might it be safest to always start the the CFMWS fake nodes at
> at a minimum of node[1]. Maybe srat_disabled() can be used to decide.
>
> >
> > Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
> > ---
> > drivers/acpi/numa/srat.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
> > index 00ac0d7bb8c9..eb8628e217fa 100644
> > --- a/drivers/acpi/numa/srat.c
> > +++ b/drivers/acpi/numa/srat.c
> > @@ -646,6 +646,9 @@ int __init acpi_numa_init(void)
> > if (node_to_pxm_map[i] > fake_pxm)
> > fake_pxm = node_to_pxm_map[i];
> > }
> > + if (fake_pxm == PXM_INVAL)
> > + pr_warn("Failed to find the next unused PXM value for CFMWs\n");
> > +
>
> How come it is sufficient to just warn?
> As per my comment above, can we adjust?
>
Sure. Thanks for your suggestion.
>
>
> > last_real_pxm = fake_pxm;
> > fake_pxm++;
> > acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-11 3:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 9:39 [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs Yuquan Wang
2025-03-10 18:13 ` Alison Schofield
2025-03-11 3:48 ` Yuquan Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox