From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbdHJFKV (ORCPT ); Thu, 10 Aug 2017 01:10:21 -0400 Received: from mailout2.hostsharing.net ([83.223.90.233]:37839 "EHLO mailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdHJFKT (ORCPT ); Thu, 10 Aug 2017 01:10:19 -0400 Date: Thu, 10 Aug 2017 07:10:16 +0200 From: Lukas Wunner To: "Rafael J. Wysocki" Cc: Linux ACPI , Mika Westerberg , Srinivas Pandruvada , Linux PCI , LKML , Lv Zheng , Bob Moore Subject: Re: [PATCH 3/3] ACPI / scan: Enable GPEs before scanning the namespace Message-ID: <20170810051016.GA7953@wunner.de> References: <12346760.yAFCnkEgf6@aspire.rjw.lan> <6344941.kJ2o2XerZ0@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6344941.kJ2o2XerZ0@aspire.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 10, 2017 at 12:34:23AM +0200, Rafael J. Wysocki wrote: > --- linux-pm.orig/drivers/acpi/scan.c > +++ linux-pm/drivers/acpi/scan.c > @@ -2139,6 +2139,10 @@ int __init acpi_scan_init(void) > acpi_get_spcr_uart_addr(); > } > > + acpi_gpe_apply_masked_gpes(); > + acpi_update_all_gpes(); > + acpi_ec_ecdt_start(); > + > mutex_lock(&acpi_scan_lock); > /* > * Enumerate devices in the ACPI namespace. I notice this is called from a subsys_initcall(). We scan the PCI bus much earlier in arch/x86/kernel/early-quirks.c and it would be possible to identify presence of Thunderbolt host controllers in an early quirk (using the method of pci_is_thunderbolt_attached()) and, if found, enable their GPEs or all GPEs. Just as an aside in case your method doesn't work, I'm not affected by this issue being a Mac user... ;-) Thanks, Lukas