Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1324891lqd; Thu, 25 Apr 2024 11:56:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/7gM8rhwGHovaedVyPU43Ft0j1/SWbDG34Mc6NyWzeWjjny6UWBWIhMNgVJvd1kaKiN2/wUccbo94DGeLLdWaE7/kNDe6Q/beF1sgwA== X-Google-Smtp-Source: AGHT+IG96rd5cNk8noHMbLLZAbW4zpWAOiJI9wyqjXrXqEm4KjcF5ko/csxzwmJNnJoLuuGcYi0W X-Received: by 2002:a17:906:2549:b0:a52:5b71:d91f with SMTP id j9-20020a170906254900b00a525b71d91fmr433757ejb.19.1714071381825; Thu, 25 Apr 2024 11:56:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714071381; cv=pass; d=google.com; s=arc-20160816; b=abyFrpHFFinDRCDAl9OLAk7NU9doja9EE0StytjjbhKQh5FTF8YmQFNVTQnJsONzUq WtJMK+XTwE4aK4x2F/j4mMg4IhytiMtdHlwHwKE7AAi6KbSN4IKHVwlBMzt81JAmSclC q528O+DO/naJHWG3dNflV7e+ffaM0F1vGNxvDBONJRt/9bTeDSax5Pl0o8ADI5uCr3dS LLx0tUNRTQyzZspeZ1aRfOIOm/yGAnVnpSj6eE0bddxwqi3EMtOR3lMyV8GuUdxMY0dB tmX1Eo9x/d+O46PNDGb1GuMpF5FDHxU4l9debqlM9Yd7zKhIaHo6Zah6BdGvzKWivJKM yr1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=NjFf2vyy9eNz+WD9ZqABdqIykwkNWKbgnPSozxbXwyM=; fh=h8Mcl4zFk1yhLQQH/Ob1zRQR1yEVEfQo/7fDQODhHXY=; b=n/a/vgJrGAdSeyrPV8d24ePSzbkXbRDkr4sLnREdA68Um/iQHAV0Kq/nMeh04+MIem YH+trH01WFv9IxVi4mS16VI55F2bhb9nVAmVmJONceeZLlHcbEJnqBzHZk9EZ+p5Hl2H gqLbWauTE7i/lVRXWhuNsIO5NnkOIr0L6O2Ywtcbyuly2AAbOgRzOBbnDlAkEu3av9NT xxrQyIq6di9fNlcKxOat7XHmdnjgdfYg37dBJh3zHa4Jdcv3FJhwQKZRLrSEnhhyYqKg tpUVHTA7i7R5FRY6WnYHFnaLJI/K9Na7jL/J1J2cOSGjZl9zEQDDC1Zg/Zrr5H09M0Ak uPMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-159042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159042-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id le5-20020a170907170500b00a588759ba0asi3026751ejc.427.2024.04.25.11.56.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 11:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-159042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159042-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8C28C1F237CB for ; Thu, 25 Apr 2024 18:56:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2C6115218A; Thu, 25 Apr 2024 18:55:37 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 642A21514DE; Thu, 25 Apr 2024 18:55:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071337; cv=none; b=BQhDJE2OX0CqzJMpO9NSbqIFq7BwhPseb+2yrNa301knWLeVVqkKWktnQ+Yl+pzcrG0KECofgeDj5kh4EojdeBLuGWdtRdIK2FLMTy5DcRkVl+DXMcvYmo2DUrw8+nZe2iuEH0ujq14kaLEj1uaT6yXQHeuNO5xMfWntyDx2onM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071337; c=relaxed/simple; bh=FxDmiqcpQtTAg8MwB+A5Ghr03gw4rpc4QbTB94+pWZQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FGmxAv75RUCW9CO9eobY7EVxbbMc3CGwjbGLTP2CJnjXTtYVQKmXw/XHZXEuNlB7vkMCFg1V6UXy2MYILHNK42//jgPFU4TlZ6zYRbBN+cFYF14WtnK29CSeMmXnl14QyqU0TE7y1FSMvjlNENdK4zGykrP/aPYdMQBa6bzM6lI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0DEAF2F; Thu, 25 Apr 2024 11:56:03 -0700 (PDT) Received: from [10.57.75.39] (unknown [10.57.75.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D0CF03F793; Thu, 25 Apr 2024 11:55:33 -0700 (PDT) Message-ID: Date: Thu, 25 Apr 2024 19:55:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/3] thermal/debugfs: Pass cooling device state to thermal_debug_cdev_add() To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , LKML , Linux PM , Daniel Lezcano References: <5774279.DvuYhMxLoT@kreacher> <2181352.irdbgypaU6@kreacher> <4f21ee21-0178-4d50-a535-4d530baf82d1@arm.com> Content-Language: en-US From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/25/24 19:53, Rafael J. Wysocki wrote: > On Thu, Apr 25, 2024 at 8:42 PM Lukasz Luba wrote: >> >> >> >> On 4/25/24 14:00, Rafael J. Wysocki wrote: >>> On Thu, Apr 25, 2024 at 2:36 PM Rafael J. Wysocki wrote: >>>> >>>> Hi Lukasz, >>>> >>>> On Thu, Apr 25, 2024 at 12:02 PM Lukasz Luba wrote: >>>>> >>>>> Hi Rafael, >>>>> >>>>> On 4/23/24 19:00, Rafael J. Wysocki wrote: >>>>>> From: Rafael J. Wysocki >>>>>> >>>>>> If cdev_dt_seq_show() runs before the first state transition of a cooling >>>>>> device, it will not print any state residency information for it, even >>>>>> though it might be reasonably expected to print residency information for >>>>>> the initial state of the cooling device. >>>>>> >>>>>> For this reason, rearrange the code to get the initial state of a cooling >>>>>> device at the registration time and pass it to thermal_debug_cdev_add(), >>>>>> so that the latter can create a duration record for that state which will >>>>>> allow cdev_dt_seq_show() to print its residency information. >>>>>> >>>>>> Fixes: 755113d76786 ("thermal/debugfs: Add thermal cooling device debugfs information") >>>>>> Reported-by: Lukasz Luba >>>>>> Signed-off-by: Rafael J. Wysocki >>>>>> --- >>>>>> drivers/thermal/thermal_core.c | 9 +++++++-- >>>>>> drivers/thermal/thermal_debugfs.c | 12 ++++++++++-- >>>>>> drivers/thermal/thermal_debugfs.h | 4 ++-- >>>>>> 3 files changed, 19 insertions(+), 6 deletions(-) >>>>>> >>>>> >>>>> I'm trying to test it on my board and do the review, but faced issue. >>>>> For some reason I couldn't apply that patch on the latest bleeding-edge >>>>> branch. >>>>> Could you help me in this please? Is there something missing in the >>>>> patch set (like one more fist patch)? >>>> >>>> I messed up the ordering of patches (patch [2/3] should be the last >>>> one in the series) and on top of that, you'll need a small rebase on >>>> that patch. >>>> >>>> Sorry about this, I'll send a v2. >>> >>> Actually, the ordering was OK, but the rebase of the second patch is >>> still needed. I'll send a v2. >> >> Thanks, I've seen it. That v2 applies smoothly and runs on the board. >> I'll test it and review. > > Thank you! > > Please also see > > https://lore.kernel.org/linux-pm/12427744.O9o76ZdvQC@kreacher/ > > which is actually more urgent because the fixes there address more > serious issues (I would even consider them as 6.9-rc material). Yes, I've read that patches' headers and glanced through the code. I'll do the review & testing on them as well today.