From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EADB8C43334 for ; Tue, 12 Jul 2022 11:35:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kjNogxttzXSU6Z8PvqV/4rlrFxsxHbQ5TUtVn2BD8Pc=; b=G6nQnxqMz1cP5a j0OuhNQD+Ln1ecRn5gIclFdx20GEDn+UhsxmpuGJ8vRRvNgszdqt2mxBcQ3ifThB9kywK+p+k06cs fXWUnRfmt8vVVzWUAD8wDO9+gAsoQDO+ITSVJdIyj8R7YJEksMG/URUyOZDTqr7Qh7erLhbY8C3ON M6NGyu4SmOw3BURTEUgmq0U1IU/KMgnSQH0slfOS8hsnJLnytILp3YY79li4Zx63CU9PuPCt5UCGy 2hJIJcCweScs4BRGRWmRokyREMmfBsTC+teh7tsHNGk195UudUMnki505xwXeI9tPssIj1M7MQGSZ +F6fmuZwMS53g0m8lIpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBE9x-00AUyl-E4; Tue, 12 Jul 2022 11:34:33 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBE9e-00AUrR-9W for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2022 11:34:15 +0000 Received: by mail-pj1-x102e.google.com with SMTP id v4-20020a17090abb8400b001ef966652a3so11106330pjr.4 for ; Tue, 12 Jul 2022 04:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WHpICsyByAQH93fjocLsnPpN777QDLGLHmPw1NuqSiI=; b=HiWiJHoIMTwU/6yayll4vWwEVSoyDhb3Rr+kWxAHJ6wVtixr58GSQ8/vOUuXyZhSBH 9UHzutDKljJGdU7Tav0qNG9aObjZYZF2PYLFh018b7wUnh1YSRW6tF+xpzHcOTxrg869 qMmLVmsVV2zjXqecmyRCvbS0iZRMn1T6s9b2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WHpICsyByAQH93fjocLsnPpN777QDLGLHmPw1NuqSiI=; b=hr2I3ufnFpcgfZfRmnw0yHHA0JC9XgmnRY+uk9quyfdwKPFLkb5wBv+PbfX+KhkCFy vw6cFmnErIotoNbGQLkTdwHDnV+LpRkFDHzTSrZ9GDqs0qPVmhswNHe3rehoHhOzgg1W 1N5swr3esytsovgl6g6Oa8d6QuPdJOlJVR6CVyQHqahBiJN2MBmKAy97obogHFR+25Ge HRSfC0WN0LEmBB6wW2ntQpumm5OM2YnTyIaNDkILgK9CcR7OvTyYze9bTLdYO9MnTC2K 1vKJNR9EfYHqPv602snA2kMcD57TPLvvRixlwBrZCnJgssEngPhKP6hnUhW12bI30bYY D7tw== X-Gm-Message-State: AJIora8PxbmUfR0XoXMfY79MSVg2cK4kP+PceTptmWcHk09Ue/lCB8Pi m7PP2HWoGbF5uQaJV1/G8KNvww== X-Google-Smtp-Source: AGRyM1t9YjFM9jfrb3CKRXxvF1sBMXVpXvetHSpZs3rbBUk7GAB2Qt1od81KyIufbdXQokePzaibcQ== X-Received: by 2002:a17:90a:4294:b0:1ee:f3f2:9cd0 with SMTP id p20-20020a17090a429400b001eef3f29cd0mr3812180pjg.79.1657625652797; Tue, 12 Jul 2022 04:34:12 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:d1a9:ca7d:e86f:cf6f]) by smtp.gmail.com with ESMTPSA id 80-20020a621653000000b0052890d61628sm6537967pfw.60.2022.07.12.04.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 04:34:12 -0700 (PDT) From: Chen-Yu Tsai To: Michael Turquette , Stephen Boyd Cc: Chen-Yu Tsai , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= Subject: [PATCH 2/2] clk: core: Fix runtime PM sequence in clk_core_unprepare() Date: Tue, 12 Jul 2022 19:34:02 +0800 Message-Id: <20220712113402.871838-3-wenst@chromium.org> X-Mailer: git-send-email 2.37.0.144.g8ac04bfd2-goog In-Reply-To: <20220712113402.871838-1-wenst@chromium.org> References: <20220712113402.871838-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220712_043414_355754_AC1098A1 X-CRM114-Status: GOOD ( 13.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the original commit 9a34b45397e5 ("clk: Add support for runtime PM"), the commit message mentioned that pm_runtime_put_sync() would be done at the end of clk_core_unprepare(). This mirrors the operations in clk_core_prepare() in the opposite order. However, the actual code that was added wasn't in the order the commit message described. Move clk_pm_runtime_put() to the end of clk_core_unprepare() so that it is in the correct order. Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Chen-Yu Tsai --- drivers/clk/clk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index b3de636eec84..87684daadedd 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -855,13 +855,12 @@ static void clk_core_unprepare(struct clk_core *core) if (core->ops->unprepare) core->ops->unprepare(core->hw); - clk_pm_runtime_put(core); - trace_clk_unprepare_complete(core); if (core->flags & CLK_OPS_PARENT_ENABLE) clk_core_disable(core->parent); clk_core_unprepare(core->parent); + clk_pm_runtime_put(core); } static void clk_core_unprepare_lock(struct clk_core *core) -- 2.37.0.144.g8ac04bfd2-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel