public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: dan.j.williams@intel.com, nvdimm@lists.linux.dev,
	linux-cxl@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: vishal.l.verma@intel.com, ira.weiny@intel.com, rafael@kernel.org
Subject: Re: [PATCH v2] acpi/hmat: Fix lockdep warning for hmem_register_resource()
Date: Thu, 16 Oct 2025 14:12:21 -0700	[thread overview]
Message-ID: <8c65e30c-5273-4098-ab63-cba51563c244@intel.com> (raw)
In-Reply-To: <68f1421f4320b_2a2b1004e@dwillia2-mobl4.notmuch>



On 10/16/25 12:06 PM, dan.j.williams@intel.com wrote:
> Dave Jiang wrote:
> [..]
>>> diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
>>> index 5a36d57289b4..9f9f09480765 100644
>>> --- a/drivers/acpi/numa/hmat.c
>>> +++ b/drivers/acpi/numa/hmat.c
>>> @@ -867,6 +867,9 @@ static void hmat_register_target_devices(struct memory_target *target)
>>>         if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM))
>>>                 return;
>>>  
>>> +       if (target->registered)
>>> +               return;
>>> +
>>
>> So this still triggers the lockdep warning. I don't think it's smart
>> enough to know that it gets around the issue. My changes with a new
>> flag does not trigger the lockdep.
> 
> You have a case where target->registered is false in the
> hmat_callback() path? How does that happen?

It seems the ELC nodes are not on CPU node and also not generic port nodes. This platform has socket 0 and 1 where the memory targets are registered. However, node 2 and 3 gets hot-plugged and does not target registered at hmat_callback() time. > 
> ...and the splat is the same hmem_resource lock entanglement?

yes

Yes.

      reply	other threads:[~2025-10-16 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 16:29 [PATCH v2] acpi/hmat: Fix lockdep warning for hmem_register_resource() Dave Jiang
2025-10-15 20:19 ` dan.j.williams
2025-10-15 20:21   ` Dave Jiang
2025-10-16 17:39   ` Dave Jiang
2025-10-16 19:06     ` dan.j.williams
2025-10-16 21:12       ` Dave Jiang [this message]

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=8c65e30c-5273-4098-ab63-cba51563c244@intel.com \
    --to=dave.jiang@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=vishal.l.verma@intel.com \
    /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