Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1864464ybh; Tue, 14 Jul 2020 09:13:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ28G8tFEGiQLJUQsUHguXbCtK0zBslDB0U+YBG1v6WeFxSfBNRj3/aCUkN00OQMsyOrn5 X-Received: by 2002:aa7:c80d:: with SMTP id a13mr5311225edt.327.1594743213968; Tue, 14 Jul 2020 09:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594743213; cv=none; d=google.com; s=arc-20160816; b=vqzrcnLl2GeN9Mc+YOVuDlgHTe2/EPDRohztCBmjG+Wl3DQR1JhB9bUHTs12/U/sdW H0AgGtkM5nqIow5NwUm8Qz8bq8R0G6SWskBQv1/scIsL5+lf/YfYDyTnTT1CxHykEcbT H/49G4uxb1DHffiRumoc7lFfCiAzYtF7tS4xfCkrqrEs5+zghoDHmlwj6D23Ou95Lwyj u/vR2bh4hfKzOoWk6U8VpnBOqfMv3EHz7cm6TgMvWs3dp4+/19X4k/bBCbKXOPPnKCW4 GaYQz9FImusR8cNdrvwM796ackoJcmjXZLs3gDBTVfmyrFOM+BMBCvBXsAjRDnKgz5Wo AFhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:dkim-signature:date; bh=jgJUiW6S/kN6tTcBjma7MrcZFC3DmxgiA9URsv4EsU8=; b=YdkhpcF5HjEXdjnhU2T9ShfbbLQacVqyZAxawFE6Fc0x9NVsA0O5xmAy+t8NFDANTO ZvZMjGqtAoux20jOcE1/tNfThBLJQdm7RXArBWy0CWs1M2BSBsGg2p1cBLBm7HnrZ86G 6+I3rydpAijbyIRmoJbQxlWLAKPCKc87faOglW2DK2OyYRMfethdMxveCJUri6Nyx3uB aD6mSNZFaupr0V5fnOLsBMkvL/KAgB+DI5HEoRXesk7N19naArQaOmAr+JZi3B4V0VIN M2HWLqkDWO5H5tGVOqj0kVyl8fOAwJyxn6TxPte0eGYFyB4ROVsNdIp2umnUzg8cHf38 NuIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oO2la2ky; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ki+w0yJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si10883539edy.317.2020.07.14.09.13.11; Tue, 14 Jul 2020 09:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oO2la2ky; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ki+w0yJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727999AbgGNQKZ (ORCPT + 99 others); Tue, 14 Jul 2020 12:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726843AbgGNQKZ (ORCPT ); Tue, 14 Jul 2020 12:10:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16722C061755; Tue, 14 Jul 2020 09:10:25 -0700 (PDT) Date: Tue, 14 Jul 2020 18:10:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1594743023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jgJUiW6S/kN6tTcBjma7MrcZFC3DmxgiA9URsv4EsU8=; b=oO2la2kywcvt42f81gP0SRIMfcB10xBaqzb3G8NYdaxajM1PirdTtr1sgaFnCQ4yQerr4A DMixhPZIJUfVMXN8eSm6dJkChdbexabni2TfuM0wmmfx7iSQz4qm2hMGy4Vz9aJuP19cK6 25/SGE8E1Lvd6Pgn1zCRNF8nWH80H7kWtAdcNtUs0wWJiyJF/sZuvogogqKSNzuWSdkkF4 AQITdg3hEGgWg4ImZer5SKsMvDBLu/L6+WT/YJQSLwG4tmNt8KV6+Z6yErKUIZfwR9kCis Y+smOjikRPufY2NkTKXk4NnZBfcSL74f5S9LYnuLHurKsl3k/GPvpFIuMHUPDg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1594743023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jgJUiW6S/kN6tTcBjma7MrcZFC3DmxgiA9URsv4EsU8=; b=ki+w0yJT5ysLcMWCjlIS9M+NOkrfL9G7d2hAo0F3fcb905dnNgUaV0k8ftcKtxl7PxGrwP AJ1xzUr8xDGKvgAg== From: Sebastian Andrzej Siewior To: "Rafael J. Wysocki" Cc: Zhang Rui , Robert Moore , Erik Kaneda , "Rafael J. Wysocki" , Len Brown , Thomas Gleixner , Peter Zijlstra , Linux Kernel Mailing List , ACPI Devel Maling List , Stephen Berman , "open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" Subject: Re: power-off delay/hang due to commit 6d25be57 (mainline) Message-ID: <20200714161021.5rh2hjiucrwot7em@linutronix.de> References: <20200616155501.psduxnisltitodme@linutronix.de> <871rmesqkk.fsf@gmx.net> <20200617142734.mxwfoblufmo6li5e@linutronix.de> <87ftatqu07.fsf@gmx.net> <20200624201156.xu6hel3drnhno6c3@linutronix.de> <87ftak2kxr.fsf@rub.de> <20200714134410.3odqfvjq6rndjjf6@linutronix.de> <20200714141135.47adndrsdgpiqfy4@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-14 17:53:15 [+0200], Rafael J. Wysocki wrote: > > shows the pattern and we nailed it down that it comes from > > thermal_get_temp(). > > acpi_evaluate_integer() doesn't show up in the trace, though, AFAICS. I deducted it. acpi_thermal_get_temperature() -> acpi_evaluate_integer() and the dmesg showed | ACPI: Invalid passive threshold | thermal LNXTHERM:00: registered as thermal_zone0 | ACPI: Thermal Zone [TZ10] (17 C) | thermal LNXTHERM:01: registered as thermal_zone1 | ACPI: Thermal Zone [TZ00] (28 C) and overriding thermal.tzp to a higher value made the issue go away. There is a complete dmesg https://lore.kernel.org/lkml/87v9l65d2y.fsf@gmx.net/ > > I assumed acpi_ex_opcode_2A_0T_0R() since the other > > candidate was acpi_ev_asynch_execute_gpe_method(). > > Which probably is the case. Specifically > > acpi_ev_asynch_execute_gpe_method: Evaluate _L66 > > is likely to cause the Notify() to be dispatched. Okay. I hope Stephen replies later with a backtrace. > > Stephen, the patch attached adds a WARN_ON() statement which will > > produce a stack trace (4 or so). Could please run 'dmesg' after a while > > and send it back. There should be a > > "WARNING in drivers/acpi/acpica/evmisc.c" > > > > statement or something along the lines. > > > > Rafael, are you also interested in an ACPI dump? > > That might help a bit. > > So what probably happens is that poking at the TZ causes a GPE to > trigger and a Notify() to be dispatched which then goes into the > workqueue for execution. > > Now, I'm not sure what happens to those Notify() items, though. They > each should cause a handler (in the thermal driver) to be executed, > but does that happen? Are you asking for a trace point in acpi_ev_notify_dispatch() to see what it actually calls as in info->notify.global->handler / handler_obj->notify.handler ? There is no handler in the thermal driver or do I just not recognize it? Sebastian