Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2907368lqp; Mon, 25 Mar 2024 12:40:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+k9DRiiml59uJ0yMtI5EfevxD1vvev2s9sb83OCPq0jYvlsHj7Io405tVG3ShDNpjhtLay9AvMUcFVBuWCBRdJXXiqRgohnkqE03btQ== X-Google-Smtp-Source: AGHT+IEC2e9HIOiyU9T7F9XTYabXJgnpDBc2AijCk5Br3qUqIRRhIyi/KW8WTu7QWz5g0lL0rSVI X-Received: by 2002:a05:6808:3096:b0:3c3:cd22:5adf with SMTP id bl22-20020a056808309600b003c3cd225adfmr5116456oib.34.1711395626074; Mon, 25 Mar 2024 12:40:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711395626; cv=pass; d=google.com; s=arc-20160816; b=ny8zn/OE4y3kvolBMRcnq45qEsOXACguzoeunQkkB4vu1+oPWE1Br7ljjuZZkUJmCU XC6GhSVKKn/yhTH1eYlhKU/qCahIoru3bNMh4k0kbDqQzsOGeyJ+kc+7TO5qz/A/06z6 N3HP5Y04oPs1sRHqLE2BXvjOyhofY2prpUzwdNA6wttUOVQYAg2BsAztUyCeB/iB/X2v m3BoNFO1fHU+1+E4h5zUrI7a0idB1RCQZCVUCyMzbp90v0gZnp4FMrXwPrOcTnr/rEeA k3SH3eJkAm/PSDfx0HRouzjG596H1y5p0wRubx91wD+QVfnb0c5uixG5ZkxPyTdi3HDy Gz8w== 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=rCSW8ugAsHBM7+R2hVkV4HgvR3WEY/XblW4OKhzKjhs=; fh=sb4L4MkDlaelNHBPxTk1e4ZieVXpt7hrEBK5Y1SfUMg=; b=1AbG5VdwQx71s4+FAQ53VyZ9kMohr+OBtyJRcN7ipTKZcb90+pj4K/AIiAVEbUToY9 1nl29c914OzxEHape6oeKpPtViSwOitxwwlKfeSd/+DkfRIIdfApFZEizCnI97Fq5xlv I9jhpiQfZV0XT+eZWu37uruZNfIXO0Tt96SR7n/lMZsgwXWKRcMjBtsGaABry8BRvnGz BcATqdhkbMgetaQZbK9cAs/oGGJiCm25YxQ9AH2RoYLGldevY3d0lgzpN8nky8u8lt3Q 1Lzdqv+35qsHFk76bqTAUHqIzEKC3a7bWekszrs5Zh75SU0ZCgI5kOvDZ1Km2lndTtjr DsTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="iA/LUXns"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-117832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f12-20020a05622a114c00b00430c156a302si6030518qty.806.2024.03.25.12.40.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="iA/LUXns"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-117832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 C6F821C382BA for ; Mon, 25 Mar 2024 19:40:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 829631C2AC; Mon, 25 Mar 2024 19:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="iA/LUXns" Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20ECB1B978 for ; Mon, 25 Mar 2024 19:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711395610; cv=none; b=R2P9lxHxGOTVJh2QXMTV7PivwJLEN5Lt99gRel1USfWVsqA8NP0d9IWkVpiG7IJD4PHTxo6wLV5TCvermaoxJzGf4m9dPbqi9/OCJeELN6mSmx+TVR9Wnf7wFJKnROojMRAvOibmo2YryNRdH0Ad1d7Omt+pO+zvBhoCGxjFNUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711395610; c=relaxed/simple; bh=KlDcReSHkzr3q7MI7ZjcywQz9k72vldHzd9nToqdlAU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=V9JSNL0NXfrvAo6Dy4lE74NYMlGr87rfUh6I9E9LTtxGN384JbpKoCbTREHCvuvEsPqseAXKzWMztloH3ARw4z1ZViNpr6p7Co31Vc1EFfOZr9axn6B/bRsb8lX3JG61+TqzmHqI7QKzhPPBvES9BOdn3TTeEgufP/QGV8bq0Nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=iA/LUXns; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-789db18e169so367398385a.1 for ; Mon, 25 Mar 2024 12:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1711395607; x=1712000407; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rCSW8ugAsHBM7+R2hVkV4HgvR3WEY/XblW4OKhzKjhs=; b=iA/LUXnsU+cF2FQLrvvD8o1D0KazyIqqobie89ph4jpmh4YifsNqZ9lugcML6p9uRc at3vNU7gL35Kt+S+r4OmiwIOFhp4pnXJKRVSRIfbp/Awevw3UM1fY/P/NgUgpsim/W9B dVk378yrxWeNdJ8mTf3v/CgV75X/2/U9apPpI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711395607; x=1712000407; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rCSW8ugAsHBM7+R2hVkV4HgvR3WEY/XblW4OKhzKjhs=; b=l5Q+id9ElezqFaKlDoIPcrnjf3HqkbzZyPcUuT5RE5n+eQEg4/aJnETUQHNrWDkGUi HusnMdSL38dBBYoCCJGrtsncE2NmIu9to9uIwFaEOiPZKnnySiTF6ILViZZwr/iF2d3f VBnEpxukNRUlXQy+T8BXt12tCaoctQgpSIxLMerwYtM0NcBWaxX0zvZsbTVRmn2pOA8Y FchTW69utdrSBCmoottFmobtDrBIOY+8uJfUEom79OcT2bShWNrlYmx2cyJqrnqsyP2b KqUwxIGaHySTo8KU3lXwsXAv4bP+BrbRCkEpeYPfkYzdvnyJsDrHxFXQm962U0g4W6qg 4fqg== X-Forwarded-Encrypted: i=1; AJvYcCWqGxJna6KFp675L0pTvb01QVglZZPqsQoFozofcRePns0ZrRE2CCekPJRlsC63zPR5IuyJpM8ykOc+g7iX0uwkGkkM+NpkASNRs60L X-Gm-Message-State: AOJu0YyebW5S2/eJEFZ4Bis9UStM79STP1ohQWED/e9yPlVqaRc21fNK QlXtqLCKUa8xp8BmRSRMteU579bR34I0bDZRqv3Bd52ZiCdo1Aam44PDZ7wWwqqlpj978gPEwZk = X-Received: by 2002:a05:620a:2ec:b0:788:2e47:b290 with SMTP id a12-20020a05620a02ec00b007882e47b290mr8401211qko.73.1711395607052; Mon, 25 Mar 2024 12:40:07 -0700 (PDT) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com. [209.85.160.178]) by smtp.gmail.com with ESMTPSA id vz15-20020a05620a494f00b0078821519902sm2388855qkn.20.2024.03.25.12.40.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 12:40:06 -0700 (PDT) Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-42ee0c326e8so3061cf.0 for ; Mon, 25 Mar 2024 12:40:06 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVDiQbN+Tp8K6YUGApTHx5CVRLg2e70TG906+zZrpJfOEMUVSeHV+E+RrIgbXGi+LR1WifkW90W8ayg09PGxzFdAR0OWTy75EzN7NwH X-Received: by 2002:a05:622a:553:b0:430:b590:e88c with SMTP id m19-20020a05622a055300b00430b590e88cmr1295243qtx.6.1711395605673; Mon, 25 Mar 2024 12:40:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325184204.745706-1-sboyd@kernel.org> <20240325184204.745706-6-sboyd@kernel.org> In-Reply-To: <20240325184204.745706-6-sboyd@kernel.org> From: Doug Anderson Date: Mon, 25 Mar 2024 12:39:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/5] clk: Get runtime PM before walking tree for clk_summary To: Stephen Boyd Cc: Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, linux-arm-msm@vger.kernel.org, Taniya Das Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, Mar 25, 2024 at 11:42=E2=80=AFAM Stephen Boyd wr= ote: > > Similar to the previous commit, we should make sure that all devices are > runtime resumed before printing the clk_summary through debugfs. Failure > to do so would result in a deadlock if the thread is resuming a device > to print clk state and that device is also runtime resuming in another > thread, e.g the screen is turning on and the display driver is starting > up. We remove the calls to clk_pm_runtime_{get,put}() in this path > because they're superfluous now that we know the devices are runtime > resumed. This also squashes a bug where the return value of > clk_pm_runtime_get() wasn't checked, leading to an RPM count underflow > on error paths. Ah, interesting. Thinking about this, I guess it means that a single device that returns an error from its pm_runtime_get() will fully disable the entire system's unused clock disabling as well as the entire clk_summary. Crossing my fingers that doesn't show up in practice... > Fixes: 1bb294a7981c ("clk: Enable/Disable runtime PM for clk_summary") > Cc: Taniya Das > Cc: Douglas Anderson > Signed-off-by: Stephen Boyd > --- > drivers/clk/clk.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) Reviewed-by: Douglas Anderson