mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Yuquan Wang <wangyuquan1236@phytium.com.cn>
Cc: rafael@kernel.org, lenb@kernel.org, Jonathan.Cameron@huawei.com,
	dan.j.williams@intel.com, rrichter@amd.com, bfaccini@nvidia.com,
	haibo1.xu@intel.com, dave.jiang@intel.com, rppt@kernel.org,
	gourry@gourry.net, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org,
	chenbaozi@phytium.com.cn
Subject: Re: [PATCH] ACPI: NUMA: debug invalid unused PXM value for CFMWs
Date: Mon, 10 Mar 2025 11:13:32 -0700	[thread overview]
Message-ID: <Z88rzKHrqlCXQOTb@aschofie-mobl2.lan> (raw)
In-Reply-To: <20250310093910.1752126-1-wangyuquan1236@phytium.com.cn>

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
> 

  reply	other threads:[~2025-03-10 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10  9:39 Yuquan Wang
2025-03-10 18:13 ` Alison Schofield [this message]
2025-03-11  3:48   ` Yuquan Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z88rzKHrqlCXQOTb@aschofie-mobl2.lan \
    --to=alison.schofield@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bfaccini@nvidia.com \
    --cc=chenbaozi@phytium.com.cn \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=gourry@gourry.net \
    --cc=haibo1.xu@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    --cc=rrichter@amd.com \
    --cc=wangyuquan1236@phytium.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®