Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3176410lqt; Tue, 23 Apr 2024 12:26:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpLW8IyLWRE08dAVyxPhwxeNuQAEHs+D0m0GxDWMe8+BIixd/MLNuU3HolTB0wsrz/q8kxAxBdi0m+xmEyFpgISXwOeVJEiB8ZPslGBQ== X-Google-Smtp-Source: AGHT+IGRXnCPtfVqa/yO62bRvW7JE4vV5ZnA/HjfUQB8jPgW1X4TPd8f7P1SeLqd4wEV5Jf3l5RA X-Received: by 2002:a05:6e02:1c43:b0:36a:1290:4368 with SMTP id d3-20020a056e021c4300b0036a12904368mr542169ilg.22.1713900379612; Tue, 23 Apr 2024 12:26:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713900379; cv=pass; d=google.com; s=arc-20160816; b=TMj7LUlNoG5z1ZyMMXmTw7Tb3zAXKhEnnW+cJNt7esWafRa48pzSqkB1d4Q56n3FV1 Rwf36DTzSeXHD+XYT20CB2n0Ie9QOUZa4Mjcfndqq4MDqAXJ61Y2hN8mEthidB+cI+HY OM0vM3k3iI3xpQcMd4AJvaE9hOXIbB+3Hk2ugbYmKE1oHjciwaMhrX3M/rvcZ0zSAY8i DPTULf+lfCSZJehKhvZsytOyheePNF9zjkTF+n9PFwXIbQLDnZZgB8tQI0iPG/cXnRU2 S5jUjMKG8D7jAphdbGgAJ0pPrkyjOdnOKKzne18l+HINOekxzfL8i5gKPu6fvt1IirWC ofIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=gU5DjyFVcSjRr2SRhtji211Cs+TNH+YaJyyQsi8/VJM=; fh=a2KpIHxhAECZXdNlHJ7yhOdPL9jcvIN32NE9hjAQRwY=; b=0PUngQQdazS/zwQQeuRikAlEz1PINc3AuNYCgRGKtLRNfIuSfql/dMKLSK9ly3s/pO 5MwaPahwyDfaV4EKNRklEb2ahuQeI7Uq0/N4dfmL862qoPW1NAW0LvxWmtKz+rMievsS 8w/hx796Xi7AQEq0D+8qaR0uSGBfVLlDiL6ns/PJNagU8eWA0Nnij/q326CFoYJdk0/e 3p+N7iL4n8WSHCwO38879Dg8QvaxuBUQrSnElmHU2hxlg/ZgYSnOUBt9FrioQ+3924zo ikiROIhxYCjgQD3so0TGFc+PFVzdmxLFpoi1LMaF/4qHijqDobTZkD7Y3sXxUwpUcmns VJIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A30vLFBP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bc25-20020a656d99000000b005eb4df79741si10142663pgb.533.2024.04.23.12.26.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 12:26:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155797-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A30vLFBP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155797-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155797-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1B06728E4B9 for ; Tue, 23 Apr 2024 19:25:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FA6B1411DE; Tue, 23 Apr 2024 19:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A30vLFBP" 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 9FE1028DC9; Tue, 23 Apr 2024 19:24:54 +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=1713900294; cv=none; b=Ig5Ai/aYeFXaGHSa2AOwu3iqhwucgkiLfm6dT5JkV67Jtbg6AIfQZrBVMA05hH/A6Pa9N1CVh1E+CM1yYkSNn3RZqWFdjBhbr5VBhe0QI/NNYr4h4esPGpvQjAcRrCRNc/WjAAVdJXI5yNtCWbeNj+o6jTYpu9wR3tSSTCZhmQU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713900294; c=relaxed/simple; bh=gU5DjyFVcSjRr2SRhtji211Cs+TNH+YaJyyQsi8/VJM=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=caIR2uyvMFwEjGGDIWqErk0N5k1hhY6g4zLirovRk2MpEW7pnxsNVOUgnaqTh8dXZvTvCEP14JhhfpskpmH+ixZaQTLwY5SFPnyrlIvYOQAtBk+SPEo3QN2ijlG0mlV9TxRXlaiKg3JopHUzznDB1j73mRkZZS0nfVzBYSgVV0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A30vLFBP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CAFDC116B1; Tue, 23 Apr 2024 19:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713900294; bh=gU5DjyFVcSjRr2SRhtji211Cs+TNH+YaJyyQsi8/VJM=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=A30vLFBPiR0pchWkzdGhcSUjqEPyqAQIcwaoYd0KLkqzW8fOwWlx7oD+jPSboDeD5 OEZZAVh+KA6sW4i1XEnbr2Lkr6w8xcVZxsTi6Lbs/4S7MEpwQQcCkdjO5arNxsM8wu j1Mi4tNQfBO8SZ9VyKh2y7bh6VSciuqYPKXJNyECB/oup5lqfMPfj+5+fOHNtuwP+4 bWzukIpPHyTER3SP1ivEylGQsnR8/h8OqTIUqzzaihcwKYhIGPU2q0XX/FLOOr6zV5 xqJ5PFZ4NIN6S8Rs3WtBsVffY9olobd4HaPTAi1xiMaqGTJrzel8DBo0XsVPOxX812 H8obg44KBdjWw== Message-ID: Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240423110304.1659456-6-sashal@kernel.org> References: <20240423110304.1659456-1-sashal@kernel.org> <20240423110304.1659456-6-sashal@kernel.org> Subject: Re: [PATCH AUTOSEL 5.4 6/8] clk: Don't hold prepare_lock when calling kref_put() From: Stephen Boyd Cc: Douglas Anderson , Sasha Levin , mturquette@baylibre.com, linux-clk@vger.kernel.org To: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Tue, 23 Apr 2024 12:24:51 -0700 User-Agent: alot/0.10 Quoting Sasha Levin (2024-04-23 04:03:01) > From: Stephen Boyd >=20 > [ Upstream commit 6f63af7511e7058f3fa4ad5b8102210741c9f947 ] >=20 > We don't need to hold the prepare_lock when dropping a ref on a struct > clk_core. The release function is only freeing memory and any code with > a pointer reference has already unlinked anything pointing to the > clk_core. This reduces the holding area of the prepare_lock a bit. >=20 > Note that we also don't call free_clk() with the prepare_lock held. > There isn't any reason to do that. You'll want the patch before this, 8358a76cfb47 ("clk: Remove prepare_lock hold assertion in __clk_release()"), to avoid lockdep warnings. And it looks like the problem was reported on v5.15.y so all 5 patches from the series would need a backport. 8358a76cfb47 clk: Remove prepare_lock hold assertion in __clk_release() 6f63af7511e7 clk: Don't hold prepare_lock when calling kref_put() 9d05ae531c2c clk: Initialize struct clk_core kref earlier e581cf5d2162 clk: Get runtime PM before walking tree during disable_unused 9d1e795f754d clk: Get runtime PM before walking tree for clk_summary