From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v1 0/3] ACPI: bus: Rework acquiring the primary physical for a given ACPI one
Date: Mon, 10 Aug 2026 18:46:43 +0300 [thread overview]
Message-ID: <annyY81d3NRYxCB9@ashevche-desk.local> (raw)
In-Reply-To: <4764923.LvFx2qVVIh@rafael.j.wysocki>
On Mon, Aug 10, 2026 at 01:28:44PM +0200, Rafael J. Wysocki wrote:
> Hi All,
>
> This is somewhat late, but since there will be follow-up changes tree-wide,
> it would be good to get it into the mainline sooner than later.
>
> It is based on the observation that the majority of
> acpi_get_first_physical_node() callers want to hold a reference on the returned
> device and the function is potentially racy because it doesn't get such a
> reference itself. There were also some comments from Sashiko pointing
> out to this as a "preexisting issue".
>
> The first patch adds a acpi_get_first_physical_node() replacement called
> acpi_bus_get_primary_device() and returning a reference-counted device (the
> former is retained for the time being, but made use the same code as the
> latter).
>
> The next two patches change the core ACPI code to use the new function
> instead of the old one.
>
> Later on, patches will be sent to switch all of the callers of
> acpi_get_first_physical_node() over to using acpi_bus_get_primary_device()
> and finally to drop the former.
I have one comment in patch 1 (see separate reply) but overall LGTM and I like
the end result.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-08-10 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 11:28 [PATCH v1 0/3] ACPI: bus: Rework acquiring the primary physical for a given ACPI one Rafael J. Wysocki
2026-08-10 11:33 ` [PATCH v1 1/3] ACPI: bus: Introduce acpi_bus_get_primary_device() Rafael J. Wysocki
2026-08-10 15:43 ` Andy Shevchenko
2026-08-10 11:38 ` [PATCH v1 2/3] ACPI: platform: Use acpi_bus_get_primary_device() Rafael J. Wysocki
2026-08-10 11:40 ` [PATCH v1 3/3] ACPI: scan: " Rafael J. Wysocki
2026-08-10 13:00 ` [PATCH v1 0/3] ACPI: bus: Rework acquiring the primary physical for a given ACPI one Rafael J. Wysocki (Intel)
2026-08-10 15:46 ` Andy Shevchenko [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=annyY81d3NRYxCB9@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
/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