From owner-svn-src-head@freebsd.org Wed Jul 5 17:39:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C2FBD8BD39; Wed, 5 Jul 2017 17:39:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5935A65307; Wed, 5 Jul 2017 17:39:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65HdHvn018602; Wed, 5 Jul 2017 17:39:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65HdHnt018601; Wed, 5 Jul 2017 17:39:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707051739.v65HdHnt018601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 5 Jul 2017 17:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320690 - head/sys/dev/acpica/Osd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/acpica/Osd X-SVN-Commit-Revision: 320690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 17:39:18 -0000 Author: markj Date: Wed Jul 5 17:39:17 2017 New Revision: 320690 URL: https://svnweb.freebsd.org/changeset/base/320690 Log: 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 Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Wed Jul 5 17:29:07 2017 (r320689) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Wed Jul 5 17:39:17 2017 (r320690) @@ -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