]> www.infradead.org Git - users/dwmw2/linux.git/commit
ACPI: OSL: Allow Notify () handlers to run on all CPUs
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Nov 2023 13:50:54 +0000 (14:50 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 6 Dec 2023 20:14:34 +0000 (21:14 +0100)
commite2ffcda1629012a2c1a3706432bc45fdc899a584
treea856d05798bd1234daf25cf3654b3f4695bc49e9
parent3f3a2599374ede5ac47ca89981ff8dd8f304d915
ACPI: OSL: Allow Notify () handlers to run on all CPUs

Notify () handlers, like GPE handlers, are only allowed to run on CPU0
now out of the concern that they might trigger an SMM trap leading to
memory corruption.  Namely, in some cases, SMM code might corrupt memory
if not run on CPU0.

However, Notify () handlers are registered by kernel code and they
are not likely to evaluate AML that would trigger an SMM trap.  In
fact, many of them don't even evaluate any AML at all and even if
they do, that AML may as well be evaluated in other code paths.  In
other words, they are not special from the AML evaluation perspective,
so there is no real reason to treat them in any special way.

Accordingly, allow Notify () handlers, unlike GPE handlers, to be
executed by all CPUs in the system.

Also adjust the allocation of the "notify" workqueue to allow multiple
handlers to be executed at the same time, because they need not be
serialized.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/acpi/osl.c