All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Mika Westerberg <westeri@kernel.org>,
	Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Subject: Re: [PATCH v3] ACPI: PM: Avoid initializing power management for absent devices
Date: Wed, 18 Nov 2026 06:52:46 +0100	[thread overview]
Message-ID: <20261118055246.GA229695@black.igk.intel.com> (raw)
In-Reply-To: <13013440.O9o76ZdvQC@rafael.j.wysocki>

Hi Rafael,

On Tue, Nov 17, 2026 at 08:09:45PM +0100, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> Commit 2f4ddf2bd1ba ("ACPI: scan: Stop calling acpi_bus_init_power()
> early") removed a device presence check from acpi_bus_init_power() which
> in some cases causes power management to be initialized for an ACPI
> device object and never used going forward.  That in turn may prevent
> power management from working as expected for other devices.
> 
> Namely, if a given ACPI device object is not enabled according to its
> _STA, find_child_checks() will return an error for it which will prevent
> it from being used as an ACPI companion for a PCI device.  Thus if
> acpi_device_init_power() initializes power management for it and its
> initial power state turns out to be different from D3cold, it may stay
> in that power state forever.  If it has power resources and they are
> "on" during the initialization, they may be reference-counted and never
> turned off.  If they are shared with other devices, they will prevent
> power from going down after attempting to put the other devices into
> low-power states.
> 
> To prevent that from happening, restore the device presence check in
> acpi_bus_init_power(), but also adjust find_child_checks() to return
> an error for absent devices (instead of doing that for disabled devices)
> in accordance with acpi_bus_init_power() and the existing check in
> acpi_bus_attach().
> 
> Fixes: 2f4ddf2bd1ba ("ACPI: scan: Stop calling acpi_bus_init_power() early")
> Reported-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
> Tested-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

      parent reply	other threads:[~2026-11-18  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 19:09 [PATCH v3] ACPI: PM: Avoid initializing power management for absent devices Rafael J. Wysocki
2026-11-17 19:24 ` sashiko-bot
2026-11-18  5:52 ` Mika Westerberg [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=20261118055246.GA229695@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=alan.borzeszkowski@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=westeri@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.