summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-03-12 23:16:46 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-03-12 23:16:46 +0300
commitf862f2919669ea6ceffb1d901d5e66c6625ad743 (patch)
tree4ae5ace824ad22ebe826212ef55d9e1b2bd2ad08
parent393815f57651101f1590632092986d1d5a3a41bd (diff)
parent591230c6f268306a673112fc3c3b74ab06fa9ee3 (diff)
downloadlinux-f862f2919669ea6ceffb1d901d5e66c6625ad743.tar.xz
Merge back ACPI OS services layer (OSL) material for 7.1
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt8
-rw-r--r--drivers/acpi/osl.c19
2 files changed, 26 insertions, 1 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 55ffc0f8858a..5e7fde31d602 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -190,6 +190,14 @@ Kernel parameters
unusable. The "log_buf_len" parameter may be useful
if you need to capture more output.
+ acpi.poweroff_on_fatal= [ACPI]
+ {0 | 1}
+ Causes the system to poweroff when the ACPI bytecode signals
+ a fatal error. The default value of this setting is 1.
+ Overriding this value should only be done for diagnosing
+ ACPI firmware problems, as the system might behave erratically
+ after having encountered a fatal ACPI error.
+
acpi_enforce_resources= [ACPI]
{ strict | lax | no }
Check for resource conflicts between native drivers
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 62b9c83d4f20..c8fe6e54daea 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -13,6 +13,8 @@
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/panic.h>
+#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/highmem.h>
@@ -70,6 +72,10 @@ static bool acpi_os_initialized;
unsigned int acpi_sci_irq = INVALID_ACPI_IRQ;
bool acpi_permanent_mmap = false;
+static bool poweroff_on_fatal = true;
+module_param(poweroff_on_fatal, bool, 0);
+MODULE_PARM_DESC(poweroff_on_fatal, "Poweroff when encountering a fatal ACPI error");
+
/*
* This list of permanent mappings is for memory that may be accessed from
* interrupt context, where we can't do the ioremap().
@@ -1381,9 +1387,20 @@ acpi_status acpi_os_notify_command_complete(void)
acpi_status acpi_os_signal(u32 function, void *info)
{
+ struct acpi_signal_fatal_info *fatal_info;
+
switch (function) {
case ACPI_SIGNAL_FATAL:
- pr_err("Fatal opcode executed\n");
+ fatal_info = info;
+ pr_emerg("Fatal error while evaluating ACPI control method\n");
+ pr_emerg("Type 0x%X Code 0x%X Argument 0x%X\n",
+ fatal_info->type, fatal_info->code, fatal_info->argument);
+
+ if (poweroff_on_fatal)
+ orderly_poweroff(true);
+ else
+ add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
+
break;
case ACPI_SIGNAL_BREAKPOINT:
/*