Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1213556rdb; Fri, 19 Jan 2024 11:35:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSp1BCS1Xwx7UaFBBO8qkAd2A7NxAQvzMC8gYLRHwePpa14HOOeITeC/bLWO4FeH8t2z+7 X-Received: by 2002:a05:622a:8002:b0:42a:2e15:81be with SMTP id jr2-20020a05622a800200b0042a2e1581bemr28223qtb.81.1705692934283; Fri, 19 Jan 2024 11:35:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705692934; cv=pass; d=google.com; s=arc-20160816; b=RnNnpbPHaW8IQ7Tw1vlnVtxlb9Gt7w7NXRjeNHlWRPVrlrcSJPZWaevfQkX1R2wvfx jfjNv7SG6UIsJn3VUJGN2CIh3OLkNzjG7fmsLd1OAkeZhXFGRlo34DpXn5oGxe5dMbrI Ynz7uswTdwi9Az42K3Nu1bSkPCA9wVunYFggx0dpxt5AXhkvTqKbInOYmNpg5Qplj0rN XH62MBIqkAECALiXj4KupdzENOGIegbiPJxe6xrpEw4eCUyjyV6hGq/nOmxK7oWcS8hC 218mlYAORJDNV4sib2yzfzo4Rfqb1Tj3O10gASDyx+5J0xjLuWl2+m6pOUQ+JLlTlZr6 U4ZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date; bh=cDputfGpYsXgBHhYFH3azCWrH6sBabARPqEt6R9exk8=; fh=vIrZHycYNT0Z9KJzhEZTtQRoCgoLqxtj5SvQCGK8QDQ=; b=yVM0PH443Irq9XhnXEvYrlkvKB7B6zL0s5oTDNWeDJwMW5tIcwUKUrOu6klXCA75Kf FqocPRVycIuziqNES8Km3acEU8J8znxVgPtSMybvYldAPmEYNW17hC9xvgdgMARaIgez GPhkfzXZpWfJAtthfv6sefYbjQoUPBZvdR06eQt28Tlq3c2w+g6BpIN8Ln2tpD0ZkZ2X xeATYXMp+MKUftkvVt+FCO5VjkUdDKIXvp//Liz1gPVDIkTxsz21tX/DQNSaBtZXt6dO 123P4jycj2FMb/0JdkGN9jd1YBjju/eSflLh6MRw2fOM8saplQROeI4U2BK71TRByR3t zi1A== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-31516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31516-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f20-20020a05622a105400b0042a2ae2eeddsi959618qte.50.2024.01.19.11.35.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 11:35:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-31516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31516-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F336C1C243AD for ; Fri, 19 Jan 2024 19:35:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02AAA56466; Fri, 19 Jan 2024 19:34:59 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18CA55644C for ; Fri, 19 Jan 2024 19:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705692898; cv=none; b=V2FiBaoBK7IETsQvt+SjsweY99Uc9b5rkJ7wLh79Qtq7STeq+YEv152Ze6hDRH4YVhkfiUqxvj1mbzgeeOCzIRsqLx3llrLdZWXZimlbzwPKGwSysnUlYMCWNH6yet2Y9Kj6oPVsi7ywD1FKazFhYgKNwkuSTOCzM9YlTNlj8bs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705692898; c=relaxed/simple; bh=oHAu0+c3vfnOnCboGZ1Ny5kms5BbTNuknWiDW4aWif0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bayVqpBzv+O/vOXEzFcZg9Kx7D8vvgIgLrJDrGN3/4oyogbF3auUrFlxrHwnUJsNMLgjP9xihU2estpz2TRu7kWZQD9dzWYQ1OBlXQr5lgMMh1bUtNSYSkmb4UP97dIWJIfHXPQKRzy94wyys3eEtiL5CjcIK7zRe1wvaRN27fU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rQudW-0006ix-Jm; Fri, 19 Jan 2024 20:34:42 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQudV-000zB8-Ce; Fri, 19 Jan 2024 20:34:41 +0100 Received: from ore by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rQudV-000mMD-9d; Fri, 19 Jan 2024 20:34:41 +0100 Date: Fri, 19 Jan 2024 20:34:41 +0100 From: Oleksij Rempel To: "Rafael J. Wysocki" Cc: devicetree@vger.kernel.org, Conor Dooley , Daniel Lezcano , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Sebastian Reichel , linux-kernel@vger.kernel.org, =?utf-8?B?U8O4cmVu?= Andersen , Rob Herring , Srinivas Kandagatla , kernel@pengutronix.de, linux-pm@vger.kernel.org, Zhang Rui , Lukasz Luba Subject: Re: [RFC PATCH v1 7/7] thermal: core: set Power State Change Reason before hw_protection_shutdown() Message-ID: <20240119193441.GB163482@pengutronix.de> References: <20240119132521.3609945-1-o.rempel@pengutronix.de> <20240119132521.3609945-8-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Fri, Jan 19, 2024 at 07:34:26PM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 19, 2024 at 2:25 PM Oleksij Rempel wrote: > > > > Store the state change reason to some black box for later investigation. > > Seriously? > > What black box, where, how this is useful and who is going to use it, > pretty please. The 'black box' refers to a non-volatile memory (NVMEM) cell used by the Power State Change Reasons (PSCR) framework. This cell stores reasons for sudden power state changes, like voltage drops or over-temperature events. This data is invaluable for post-mortem analysis to understand system failures or abrupt shutdowns. It's particularly useful for systems where PMICs or watchdogs cannot record such events. The data can inform recovery routines in the bootloader or early kernel stages during subsequent boots, enhancing system reliability and aiding in debugging and diagnostics. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |