]> git.ipfire.org Git - thirdparty/linux.git/commit
ACPI: EC: Evaluate _REG outside the EC scope more carefully
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Aug 2024 13:16:21 +0000 (15:16 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 13 Aug 2024 11:45:14 +0000 (13:45 +0200)
commit71bf41b8e913ec9fc91f0d39ab8fb320229ec604
tree2bc947b17c669cc1f4a8bebf400634bb0424ecf8
parentcdf65d73e001fde600b18d7e45afadf559425ce5
ACPI: EC: Evaluate _REG outside the EC scope more carefully

Commit 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the
namespace root") caused _REG methods for EC operation regions outside
the EC device scope to be evaluated which on some systems leads to the
evaluation of _REG methods in the scopes of device objects representing
devices that are not present and not functional according to the _STA
return values. Some of those device objects represent EC "alternatives"
and if _REG is evaluated for their operation regions, the platform
firmware may be confused and the platform may start to behave
incorrectly.

To avoid this problem, only evaluate _REG for EC operation regions
located in the scopes of device objects representing known-to-be-present
devices.

For this purpose, partially revert commit 60fa6ae6e6d0 and trigger the
evaluation of _REG for EC operation regions from acpi_bus_attach() for
the known-valid devices.

Fixes: 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the namespace root")
Link: https://lore.kernel.org/linux-acpi/1f76b7e2-1928-4598-8037-28a1785c2d13@redhat.com
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2298938
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2302253
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: All applicable <stable@vger.kernel.org>
Link: https://patch.msgid.link/23612351.6Emhk5qWAg@rjwysocki.net
drivers/acpi/ec.c
drivers/acpi/internal.h
drivers/acpi/scan.c