Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1333228lqd; Thu, 25 Apr 2024 12:11:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJQU1ool+k017Bc/I0sdj6GP7DMYZ62Zh6zcaqKhNPfXJ077bPEhD8s1rbk/PCUFfoo5j4duCRbVpYlt0GU2P/fN7h43u0/U9pkx+g2w== X-Google-Smtp-Source: AGHT+IGh0Mvtb/EYcOmmvc/EzOPHWXgZCRYfE8o3quP2s9tgNxTbIAouGokds3yFO31X4harXw7a X-Received: by 2002:a17:906:c252:b0:a55:88b9:dabd with SMTP id bl18-20020a170906c25200b00a5588b9dabdmr423665ejb.63.1714072262145; Thu, 25 Apr 2024 12:11:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714072262; cv=pass; d=google.com; s=arc-20160816; b=FDFJ7JmisuCNLbMvRGJLHFfzv1Yw3/LQeJGtx+crGZyUSHfwGkWchTMVRXp3g9FglF DXCTkT6taxDdEN1mCLjF60SK1iZlrYHCGGgDnT1odTvglqfW2bAyDzHFs5XQdtTDcFZl 58IkO9j+AhIb38R286JKRCHQRiY/fQojpS4dnzX0aQ84MZ3jp5P0cDOBEMPLG2zYDIiv 5rsCW9nh3uV7cO4hWksdSQDdthGMj08sJWRkFExM5GdaI0yyKG+USZVBJFGPUdiCEWf6 xw0bEwCLCnbQ1+M58dx+7wPH+576GcENlDznDOvJWXeV5XwCuQFzgP8HvP4SHAkS9OL0 YcsA== 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=7+cb/+oEpWAtzc+r896+kAh6LiplLoFbv2lMTTqL+Bw=; fh=PTk0ZMx1KVss6yGBIeSIqkJ9LbKJTr8BK8LgcYoT9Qc=; b=j3WQFJy+WnauEOEkKdxz0mzeYca1oSAplhFgh9PZQR332zPqyyzUMPugD58tZJ9EOr 9oNqj3zlg/eogCSPV+TbN7hO5Tx1ZERJPj/zZSL2sA/r0t9dQby6/zvS3iZ2ZDLfyxTh cEDc0I+TttKdzmtznz7xB4Ctr+e1jkJq8eup/kofeMkAC/zhdOqlZAZIOWnHm2/hetEk mjFcnPpxbBSVUpYV1BqstYvnNZ3b4EMWwgJrtxIecsZ/80RrRe7oXvc2EKHNMU345W3Z zgtrbOOYyGl19mTk25iyB7l18b0jhWU6NkzLq/Dk0hbRy1IfADeiN6EggxQL1QYpVUwo 2HpA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s2jW3VcD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159063-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qk42-20020a1709077faa00b00a54ca735287si10856096ejc.300.2024.04.25.12.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 12:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s2jW3VcD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159063-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 DB4BE1F2242D for ; Thu, 25 Apr 2024 19:11:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 962CF1514EE; Thu, 25 Apr 2024 19:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s2jW3VcD" 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 B671414E2E2; Thu, 25 Apr 2024 19:10:52 +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=1714072252; cv=none; b=egnbXKkijnQH88oVrCbP5vbCEZhp0JDVQLW1qtQFEknzlM28qNHshk9GYhdjpAm7JrxiEEN51NPPIEBmd0z59AUXA9EjY9NT1SFlNTwXTmLq/61jlrJvWrfy3sFI7WKBkItGnj9zCAe4gMDmwRMjnpINmaTbqei0alg8vz9naQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714072252; c=relaxed/simple; bh=WXcfAjQyE0v6RqZ5J2aCr0EewC3+EFNIWMbHw3sJ5zM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YYCAERfSG5SmfcdZgwn6OUVSJUYVrbVDZcylW0RwsWFK5UMKanhhNm1Ua/7aAjPBOd7JueJiQ82j21Wd8/Tv76C7iOBmi9T0sRViag5h0eXXUcUYLfn3ljRdnwwtJ2JTmqdLiYkc0JagnGnBEqomQD7ry/4oIP3aFc0POpO0D9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s2jW3VcD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F09EC32781; Thu, 25 Apr 2024 19:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714072252; bh=WXcfAjQyE0v6RqZ5J2aCr0EewC3+EFNIWMbHw3sJ5zM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=s2jW3VcD/t9eROvgbxwv1ZGsL+PkZ751ptleXvdXoP7XQmRRqKPG4i07OSTloS7Qp 42iJufu/tVqU1dtb1AhRZzXc8qPYN7514rrACQkYaFN32yIMcuibFoXSgu12vBxjqu 69nrhrG1IN7Qr7eNFxdlpn7yvDWiFG5OKel5diILK7OyEKcnNMxURemKSNonwv2uYT VwX0HOUuY+/rns/8DgqH2uICaLj2zROzWkotHa99EJ3sdBiG+cfBrRzI1x2sTeD5JO pXaP3rzxOBTESrKKYOKD/arXv6W1d7LMLOdgF0kXPsIcMxqT/N7OrvqPbbYsEFBbGh Su5GseETTDQ+g== Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5ad288442bdso244689eaf.3; Thu, 25 Apr 2024 12:10:52 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCV9DgicQ9ydRciJsRzHflP0MCNNsB2lkiJvVilJe5T44ErJgIebJbIncp+Q15THMoaaghNEY/j3EcwwmK6QgGri2Yzt3gsefcivyD89W2URTBKlJWNpBI2xEyOsL3zEVJCA7ojPM4U= X-Gm-Message-State: AOJu0Yx1qqqJ8knEuEfHOViYCg9aynlLj6riYe95SaI0icmTX00JVXvF EZMTxmNx5uffTnxtEHUzh4OuOC9cIXM+IK48KLYaM0jL7hdXYBpx3z6s2OEdOpkoRDj972XxueF 5x+1L6YHRpCGZhHa8PT7XITB9AUs= X-Received: by 2002:a05:6808:159e:b0:3c8:4dcb:1e70 with SMTP id t30-20020a056808159e00b003c84dcb1e70mr721998oiw.2.1714072251550; Thu, 25 Apr 2024 12:10:51 -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: From: "Rafael J. Wysocki" Date: Thu, 25 Apr 2024 21:10:39 +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:55=E2=80=AFPM Lukasz Luba w= rote: > > > > On 4/25/24 19:53, Rafael J. Wysocki wrote: > > On Thu, Apr 25, 2024 at 8:42=E2=80=AFPM Lukasz Luba wrote: > >> > >> > >> > >> 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 = cooling > >>>>>> device, it will not print any state residency information for it, = even > >>>>>> though it might be reasonably expected to print residency informat= ion 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 whi= ch 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 issu= e. > >>>>> 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. Thanks, much appreciated!