Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp163051lqg; Wed, 10 Apr 2024 20:48:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWar7HfvL8TDqc2nSgJbc50TBJVT+4HDXXEFlqScsFCqMMqLEa8YaLjzq3nC+dSaGE+AnfX2/UD6VXMglTImhW/6LrtnXAKrACSttOduw== X-Google-Smtp-Source: AGHT+IFn6qqGCdZnxN55P2qmRFhVYicB8mVp+1fBHNgoupWMrNcZN744jcl8HV4BvvzXFZgUqjRH X-Received: by 2002:a2e:3e1a:0:b0:2d7:b78:4109 with SMTP id l26-20020a2e3e1a000000b002d70b784109mr2775369lja.53.1712807336054; Wed, 10 Apr 2024 20:48:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712807336; cv=pass; d=google.com; s=arc-20160816; b=SPylglsnLa9VDTgkiCNR/6aZXQEtPreQ1Kq3W0C4uTC05Q6HS2vCMUhJU7AeSedn+6 OGxEexCXYXsL7fRsEOkUtDcENrXdXHZPIqfKXFGKhjIN0lOL+YU0x4DA7S8Z8nCKC2G0 J/YitEeh2WFq9dex6emN+qSTSJ+Mj6oQfPQo2hcCoutPicWvVZQ5QZGBipjY3Al6OCYg GMjtYMk4z9hfH36S50vKne8xNEe/c9cSInD4p85RGYuBhgjj3NVfCv5N9LBAy7LMn5cd 1qt1yHoKoA0ok+9k2CpkosElSZQ/5QSD75cEE8A/ON5p9ney3Y/wnQGLCOe+9L0mMHO5 2YYQ== 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=dAjmsH+6aubS715XXBaGjCsB0/CEs6SSA/8Z/p2zCYw=; fh=obDC1pCT2eiYXzLbBWah0G+x6vdkgdG/SR5JgA0nz2s=; b=wbIgWuaHWjQG9ZGA0neCZnAztGxNypE5+GND/QvdhXXfAbvVyLlrSAN/YyFjbb1zGB lggLhrOHhsMMTPgIp6Hh+bUsGuMc0q6yYjprh69JpLaF8tPMULeDRw3eeJI4E8kdjqUn D0DBrPsS88oxAYxi2yTOvdLC9cmGMaJ3lRH+udPEx+ownUUk+l8EMmDxuaqgoUIcZJnn RTJi7u1U4ktVHny+QF66SVfl+G9s7BA6nuevIFQcXBvt9Mae5bunbKJ6ZMxz5HDn/Zad RimIrAeAuPYnas3GQMVwBtw/Cxpw2LddR2KcInfzV4eC0uqHao4pIEQQRY8ipGhGYt6o 44TA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="uOTLsMD/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139728-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 fi21-20020a056402551500b0056e3bef00fesi310375edb.623.2024.04.10.20.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 20:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139728-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="uOTLsMD/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139728-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 C25B51F235A7 for ; Thu, 11 Apr 2024 03:48:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DD9613BAF5; Thu, 11 Apr 2024 03:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uOTLsMD/" 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 C6C2C13B58D; Thu, 11 Apr 2024 03:48:47 +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=1712807327; cv=none; b=Un8k4maHzSZ2/1fjJapXZIAIa2ihABjg6GIoifqr0kGbPPVDlbWYCAK0J5FkA8HZBS4/CcmZwjpwI6SptI3Vb5e5Aklncnvrg4XcbCOnltYz0MbF67w58Wrrs2yShRABA4d3zqvGQ3YwmWTOqzq7q0sg9szWdBt96dXjIxwakCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712807327; c=relaxed/simple; bh=aBDw+HokdUlrHR8iGqI7UsQz0OKWOH0/+fH0gryYk1I=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=TLIBMDFfw1kWBhF7Ji86T3JD0vkif3v9eWdxlh1b+jzsTt8K+YHzm/DhBLrMKx4yk29uFBjPGBnBXm/f+rugn6RBIy4zPVzb1HzERoICv3/T1drxjNdtu8TvcV2PRdAHOSj/N37UBIbsroS8F2D9CTZGM0Hf+3DmgMqCeRNrmi8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uOTLsMD/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48261C433F1; Thu, 11 Apr 2024 03:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712807327; bh=aBDw+HokdUlrHR8iGqI7UsQz0OKWOH0/+fH0gryYk1I=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=uOTLsMD/6bGWI/YDWW53/mkGXyoqEyZPUIZWJzgXI85IhfbANNCLeT0p0viTZKNmz 2lA+J+UyWa45KGRkMCUWvR81YMujOBDxRCl92Zbdicxl5nGHoKltAOQKhrB1VboLLL AyL+Rthux0akdTmaKCVrhRdmATzALrOuNEwrOqJpW4oppbLQYdqClRhuaextB5RZpw 0cbuzEt6NK8bTEYP2CXFoz9JjBat0PnVPIXeGYtkAhkX0po97wQcmKA+oUdJDjIRpf FU6R9DDls2jVrFaEFwx1bo/HWL5nMJfM7wQZZLD+5qpxfw4nPSvA86Pg3s5SgbsH03 bUwYLLQwbv0Qg== Message-ID: <0e92e72d610bd97963b686366c5334d2.sboyd@kernel.org> 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: <20240312115249.3341654-1-treapking@chromium.org> References: <20240312115249.3341654-1-treapking@chromium.org> Subject: Re: [PATCH v4] clk: mediatek: Do a runtime PM get on controllers during probe From: Stephen Boyd Cc: Chen-Yu Tsai , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Pin-yen Lin , Weiyi Lu , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Bosi Zhang , Nicolas Boichat , Uwe =?utf-8?q?Kleine-K=C3=B6nig?= To: AngeloGioacchino Del Regno , Matthias Brugger , Michael Turquette , Pin-yen Lin Date: Wed, 10 Apr 2024 20:48:45 -0700 User-Agent: alot/0.10 Quoting Pin-yen Lin (2024-03-12 04:51:55) > mt8183-mfgcfg has a mutual dependency with genpd during the probing > stage, which leads to a deadlock in the following call stack: >=20 > CPU0: genpd_lock --> clk_prepare_lock > genpd_power_off_work_fn() > genpd_lock() > generic_pm_domain::power_off() > clk_unprepare() > clk_prepare_lock() >=20 > CPU1: clk_prepare_lock --> genpd_lock > clk_register() > __clk_core_init() > clk_prepare_lock() > clk_pm_runtime_get() > genpd_lock() >=20 > Do a runtime PM get at the probe function to make sure clk_register() > won't acquire the genpd lock. Instead of only modifying mt8183-mfgcfg, > do this on all mediatek clock controller probings because we don't > believe this would cause any regression. >=20 > Verified on MT8183 and MT8192 Chromebooks. >=20 > Fixes: acddfc2c261b ("clk: mediatek: Add MT8183 clock support") > Signed-off-by: Pin-yen Lin >=20 > --- Applied to clk-fixes