From edab404aeca9b23ed7cbc09e28c579a7d52dfad8 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 5 Jul 2017 17:39:17 +0000 Subject: [PATCH] Defer ACPI taskqueue creation to SI_SUB_KICK_SCHEDULER. This addresses a deadlock during boot when EARLY_AP_STARTUP is configured: a taskqueue thread may call pause() with an ACPI mutex held, and thread0 may block on this mutex before configuring the eventtimer. In this case the taskqueue thread will sleep forever waiting for its callout to fire. PR: 220277 Submitted by: jhb MFC after: 3 days --- sys/dev/acpica/Osd/OsdSchedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index 0b9b12bcd2a..8e381027911 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -128,7 +128,7 @@ acpi_taskq_init(void *arg) acpi_taskq_started = 1; } -SYSINIT(acpi_taskq, SI_SUB_CONFIGURE, SI_ORDER_SECOND, acpi_taskq_init, NULL); +SYSINIT(acpi_taskq, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, acpi_taskq_init, NULL); /* * Bounce through this wrapper function since ACPI-CA doesn't understand