summaryrefslogtreecommitdiff
path: root/drivers/acpi/reboot.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 16:38:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 16:38:36 -0700
commitb76f733c3ff83089cf1e3f9ae233533649f999b3 (patch)
tree602ab14c6a9dd78e781608058c92c377b0e1cfd0 /drivers/acpi/reboot.c
parent41f762a15a6324f67c3f084ece694c26f196cece (diff)
parent2818cc745445ae5866598fe45fe563ef843e30af (diff)
Merge tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki: "These include an ACPICA code build fix related to recent GPE register access changes, a Kconfig cleanup related to the Dynamic Platform and Thremal Framework (DPTF) support, a reboot issue workaround, a debug module fix and a couple of janitorial changes. Specifics: - Fix ACPICA code build after recent changes related to accessing GPE registers (Rafael Wysocki). - Clean up DPTF part of the ACPI Kconfig (Rafael Wysocki). - Work around a reboot issue related to RESET_REG (Zhang Rui). - Prevent ACPI debug module from attemtping to run (and crashing) when ACPI is disabled (Jamie Iles). - Drop confusing comment from the ACPI processor driver (Alex Hung). - Drop a few unreachable break statements (Tom Rix)" * tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: utils: remove unreachable breaks ACPICA: Add missing type casts in GPE register access code ACPI: DPTF: Add ACPI_DPTF Kconfig menu ACPI: DPTF: Fix participant driver names ACPI: processor: remove comment regarding string _UID support ACPI: reboot: Avoid racing after writing to ACPI RESET_REG ACPI: debug: don't allow debugging when ACPI is disabled
Diffstat (limited to 'drivers/acpi/reboot.c')
-rw-r--r--drivers/acpi/reboot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
index ca707f5b521d..2a61f884e222 100644
--- a/drivers/acpi/reboot.c
+++ b/drivers/acpi/reboot.c
@@ -3,6 +3,7 @@
#include <linux/pci.h>
#include <linux/acpi.h>
#include <acpi/reboot.h>
+#include <linux/delay.h>
#ifdef CONFIG_PCI
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
@@ -66,4 +67,14 @@ void acpi_reboot(void)
acpi_reset();
break;
}
+
+ /*
+ * Some platforms do not shut down immediately after writing to the
+ * ACPI reset register, and this results in racing with the
+ * subsequent reboot mechanism.
+ *
+ * The 15ms delay has been found to be long enough for the system
+ * to reboot on the affected platforms.
+ */
+ mdelay(15);
}