Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1318516lqd; Thu, 25 Apr 2024 11:43:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULu1YDeBa/QNdwIykid9+SXacplJcjEMOH1ZVGo8Yollz+JtMYWRPyl1FrsYIdljaAKseok1q6mZYcf/D1d5CxNKHdJRVuTnSAvHpzVA== X-Google-Smtp-Source: AGHT+IFz9pi2Jftp4dIFRur3leCjw/oZEqufL1bXM6XEgHSgVgfGwtocxLGxrCdCALlFgIBki1us X-Received: by 2002:a05:6a00:8a8a:b0:6ec:f84c:902c with SMTP id id10-20020a056a008a8a00b006ecf84c902cmr551177pfb.24.1714070579990; Thu, 25 Apr 2024 11:42:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714070579; cv=pass; d=google.com; s=arc-20160816; b=TaMoXNaNX3CqGjP2Tb3miz+LFeTgAcrC6zcSTDwK5iq9NszQO2cGvrd82DZcte0M7j lGruNUVpkQvbVcATGmlyENX80ynjU/0JLipqn8Be+OKYaQFCBoJuMO/em15cyXnVAcMz jT3D3q+3OwLNouLPV6hol7PRtWHp6JTtNPy+NodsryrGSoeRL4BxKGy0/eQ8eKTHvh1v xHB1xr85f6+45SxYlv8G/xxAcp424rzQvwiXcP+HVebPrrsdCPLM4hnLhDb1P6Ys377c 5CP7i2fjK9RkIiVsDXF1bXg3+lr6Tk2TDrmJ3B67h3p1LWuhZuvVHuaO6DjMzqLmG1qL MkYQ== 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=QYBvpKY+mAsMs6BzWfK1KCB08gz3mQOUODXfAjda9LY=; fh=h8Mcl4zFk1yhLQQH/Ob1zRQR1yEVEfQo/7fDQODhHXY=; b=tXO6RFqJ2HPvhTaOo8hTLrcjOxDy0u4/Cb6pnfMpZd4ack5L3aPusiC4QyYHVL7uGH 69EMmVUpfxQRFoGPw0DzDhv5qEMr3mfRqMpPe3zoV2Gvvtbx4OrMhMuHrgKunVd8mSyo 3dC4yoaVMHRfHl7W1jN/F1izggqgH+rwwCUdUq+ZeAUy96JnJPDV6eTcy/WP/oA4CJBW DlrvQX8x7NY0IZVUjI12morA9xaBjYGAh89xkDOdnX3ljSopSUY8yaGQAk0L5aC0pZdI Xj/4L/ZVKuoma5ugPrZnoXog2xm9so+QNFls6ZJu1WQWMdcHQdMY1UmNsACT3p5ibIX7 vu5A==; 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-159025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j38-20020a63fc26000000b005d29ed61d61si13126824pgi.78.2024.04.25.11.42.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 11:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-159025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159025-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 98D042815B2 for ; Thu, 25 Apr 2024 18:42:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E2E1146A74; Thu, 25 Apr 2024 18:42:23 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C7893A1BB; Thu, 25 Apr 2024 18:42:20 +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=1714070542; cv=none; b=gvu+urXQ4TS3c2h//ldnmjuMsdLVNUAJbQTJBo6G9flo90nY3Cv/8hH6hvkCu4AmflirW7GJuVndYJ0BOH/n4XnyzylDuRTvVTbSgk90SD84aEmb3ZJszkfyFPhlV3M9HqY5tYuk8Of7eeq+n3RIsRw6BTPKVYd4mU9t4NqfPiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714070542; c=relaxed/simple; bh=vuWaZ//9gL0kA2Wo2XJ/umK6tfwaAhyZYGGSZGoij/E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NYYRRJz+wiksVAYUKqrtcb/cCciMRpCbGl8YkgwGIVxuqVB7r1en4xaanOSC+EsmsjXDHl1eqpcGYjpMxyN3m+jDKUgmCNr1eIKSLiZYOHRTXeY4qn6gQQbUIUeIgGrMAt7LwYettBYRPc/H0VDkPdNkKP/51Z7Pp+n57rpeqvA= 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 B01102F; Thu, 25 Apr 2024 11:42:48 -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 7CD553F793; Thu, 25 Apr 2024 11:42:19 -0700 (PDT) Message-ID: <4f21ee21-0178-4d50-a535-4d530baf82d1@arm.com> Date: Thu, 25 Apr 2024 19:42:17 +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> 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 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.