Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1324237lqd; Thu, 25 Apr 2024 11:54:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6d9l3HkRsRoUQdfZgT7mg6SbUSsLFxNVEoLQGYHSEVE+AGKDcPNXkogDeMFbtGaOvfBW5Mj66Tz5srUkGDq75mdWBCVsXNUrFZ91I+A== X-Google-Smtp-Source: AGHT+IGT7nkCkZ8JWFQOCXRZWnLH7fw3dswl6nFhNHA2CYzHOCB2NjleRvFMFS6u2HMW76IPXqzF X-Received: by 2002:a50:baaf:0:b0:570:5e7e:474e with SMTP id x44-20020a50baaf000000b005705e7e474emr365807ede.22.1714071297561; Thu, 25 Apr 2024 11:54:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714071297; cv=pass; d=google.com; s=arc-20160816; b=MXdyIKbAbMDbLSVt6YxslVX7aAoBcRj//sXg77B96pcdQrYIZc2Oa8PRM2iq2mQfFu Hgo3huCOKTUYEe/y2MmrPXGOVMgBdXcF1ZnQcbivVwDai4k9DEPeG2v0PvXzvqb1ZqLV pUNJvHnXRay4qet503mhl3bfQGN9l2IEAntG1TW7kMmX7s+ndB5p5dUKCDsuEN+IpPSs V4eRPs5lTRElOeY6l0LZIMm9bqxj2YzBuKPd4EH3KdqN9Z9hEk3Ekq5lYOy4W9SKKowG byuhnXRrg1nD097Cjsgn3uZWyuLUl+lrGfBm6mP+RhLNgZQAcBCdjbk6cynTy4eXbfMk hsrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=k18DIhzCuxdwC4JP6Yl+jE9h/PnpPRHmXo2MqPmGsT4=; fh=NtrGcKL+zTzzeAmZAKwBgo8j/Y2iNzQNUS9ey34memw=; b=axQfL9v+9vG2wZhQMTROSARJ9tw3Xn+ByXzZsExgD4OWe/P80gFuANgLdl1emi53vF XUoXdK7MVBA0QJ0SIdYLteyhkM2thcYSekXBud74WDzOSGMgAAXh+df5b19Ed+ExmKnj AzZVIyNRL/lUCkTV238/YQpYSj5xS4ZoBG7ZlBitNCy9XZ+3vdN3l/e9oirBPY1O1Ao2 gE7pSQNo3ZXOSKMDIQTdQ2X3Iq2dXRwD8O0zAMlwW2B+mPs24sJdZz6lUenMczAtYqUv 5qmInmMMohqfpBTp/0X6MgffnK4WpWjCmYTnezAvf4H4km5bJvQev5PePnLnPtGGJ7rI 9j/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DiFoMhwF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e11-20020a50a68b000000b00571bbab8f86si10339837edc.133.2024.04.25.11.54.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 11:54:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159037-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DiFoMhwF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159037-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4BA771F23422 for ; Thu, 25 Apr 2024 18:54:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7994415351C; Thu, 25 Apr 2024 18:53:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DiFoMhwF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9515B1534E1; Thu, 25 Apr 2024 18:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071229; cv=none; b=ZmzTs0gHN20xqIbGsI7CY0QQBGzoDUmW7LoiE5tgT0aBVgMwqEBvtdfgjrfhvmezEcaVTxXFANvY/J2NbvcdduvOKHCLhGfv92rSwVRWlDHDPlyp/fKlAYAArmZ21LDFF/SOjMs9LqO2i1os0MFUrYS/B/fY6ljMYYYWmjnArqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714071229; c=relaxed/simple; bh=BFWuGLTssRXIr5xt21+W1at5pIODCpOmFVmXcVu4PYI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EA10K6Qm7rC39NEMeRfAZD6ew93yhTv33Wb/Ui9/d7jtjNLK131paNFRslqXXSuLnEBDBE25M+If2ZIAjvUhJ5zC4qF1CuSxC5LkuNyemvpuZ1Kqteza9EQyZu8VLIwX4v0PqabTz2BOpoeSD+9HtEwOxNzIXWCVlYJY4dUu+50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DiFoMhwF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EA71C2BD11; Thu, 25 Apr 2024 18:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714071229; bh=BFWuGLTssRXIr5xt21+W1at5pIODCpOmFVmXcVu4PYI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DiFoMhwFdLuBuW2yX/yQ68HpbxTcB+auOPn1xMAW+1IcTpXsKvPn1hWpNsG8WhG1U XiH9OzRVc44s2OJcSdQRIfJwTT83z9T7i2J4haZiKNKJ240fZ9DeKBw++J8R4qcUwC jnffVSalaZBlSwcCuMdaCY5pTzXjU72pjj54Lg1gm5wZu/Gn7fuFoBhMqf2BQLOwWc iBSW3aQplLxoW2zbo7cUSWvSrIKvk1x5w7Cm0QWjZJlP9ccWbYe3nFr/oNLM/CURP7 YcDg+z6krLx4k2kK/BTO75NfUNsQCxzLIaFhLBJ5c/sylpRnzhomZVAae2AsRruSC7 DVzX2UrSUSCNQ== Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6eba841d83cso290168a34.2; Thu, 25 Apr 2024 11:53:49 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCViW5URg629onHrGUMghRExIeU5FR3Efk0oMo4ZNuNVZXgpidXDj1f5mCP8AUB0FttrcCevYddGXf70SWEGULfCmCSVOEomZqeELColyW0nLZz2GPsqsTfIL6MIL8mfPESNpuar9NI= X-Gm-Message-State: AOJu0Yzz2uouoj1wcghvjJ7OkB6XCxyAn+UX3YvNnyX73+NbfRQvYte2 xBC0ur/mzLzLzjGxGXjm3wjHsc2PepZKQWwBnw/J+qaZayDxsJm7gBUp6DPKQpcPDMZQPvJyGIy ZxRXJgAtLayGjIfjp28OIsPB28KA= X-Received: by 2002:a4a:eb18:0:b0:5af:6d3b:d952 with SMTP id f24-20020a4aeb18000000b005af6d3bd952mr820517ooj.0.1714071228759; Thu, 25 Apr 2024 11:53:48 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <5774279.DvuYhMxLoT@kreacher> <2181352.irdbgypaU6@kreacher> <4f21ee21-0178-4d50-a535-4d530baf82d1@arm.com> In-Reply-To: <4f21ee21-0178-4d50-a535-4d530baf82d1@arm.com> From: "Rafael J. Wysocki" Date: Thu, 25 Apr 2024 20:53:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/3] thermal/debugfs: Pass cooling device state to thermal_debug_cdev_add() To: Lukasz Luba Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , LKML , Linux PM , Daniel Lezcano Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2024 at 8:42=E2=80=AFPM Lukasz Luba w= rote: > > > > On 4/25/24 14:00, Rafael J. Wysocki wrote: > > On Thu, Apr 25, 2024 at 2:36=E2=80=AFPM Rafael J. Wysocki wrote: > >> > >> Hi Lukasz, > >> > >> On Thu, Apr 25, 2024 at 12:02=E2=80=AFPM 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 co= oling > >>>> device, it will not print any state residency information for it, ev= en > >>>> though it might be reasonably expected to print residency informatio= n for > >>>> the initial state of the cooling device. > >>>> > >>>> For this reason, rearrange the code to get the initial state of a co= oling > >>>> device at the registration time and pass it to thermal_debug_cdev_ad= d(), > >>>> 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 de= bugfs 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-ed= ge > >>> 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). Thanks!