Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp478402pxa; Wed, 12 Aug 2020 06:56:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzearGMgTBJv7ie0QURsY7preVDYFiOy0lpjX82Ao9GcOCvCbudY+EuAccttJfPNM1iBT6I X-Received: by 2002:a50:fc02:: with SMTP id i2mr31300678edr.121.1597240569688; Wed, 12 Aug 2020 06:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597240569; cv=none; d=google.com; s=arc-20160816; b=XYau6ULW3vjPk5MC3a+40+URoDsYGZpYnYw5I6WrGYyGApPrcnXnH9UnvziO053bc+ Ae8eR5X605AKzdrrg3DGLQqcgUsfHr+iqHSJ3itDoV7oqLT+0u2i1zJ3IaYrlz4zT8Ex AayuQRQWU3XcYzmP52gW/tMbxTWvNmRi6b+gyZUMS+GQC+RXiXXxVjdyiKcvivy0J9oP DBqLdHDCn3qDTPU7IVI9P+VpQ6T9H8pPp5rfQ9uVpPtUPBCyImkvUHXwwcCVk2k6Fup8 2kuH2MUH7YQelDiE6oGzq5lht3Lapfrykmo/ztzK1FBKuvZeK/DZOsBUHxduY0lNw3N2 kW+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8InXO4IHlwCJ/3LHKr2wC5cvoqCeqc4wxbX8rXjUiPg=; b=QsyIwPR/IUoKH5T7Pb+RfvL//Z4Ld//TH4DngNNSCyeaTHSzT8CdtXRC48hlnn7WZx 39TblAfG4ezZyuJotYaG4xulUSfDYPxBMYMMcs9UisayE4BdYZgVCpiLHVPVCQbwwBKu Gpkj9HbLQ1OakJrX9oplFzEbFgS2S4PTym4y0YlqgBZU7/Jxjd/w9PFDvAlb+5KBsAqL 09+sIDxn+tu1J1JGFk09bM1JdhJf6e1GwdmT+AEuwWmZ88GrMul4HV61i3Ueckii71Lj ibsyI17ErMXk7OkSzbBFtW+ahNJrrx0srRubzBiYRI/zJ7x0F+6ZmBl7JKOMLr8xaPE+ 40Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N+kSkmDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by25si1145410ejb.281.2020.08.12.06.55.46; Wed, 12 Aug 2020 06:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N+kSkmDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728101AbgHLNwa (ORCPT + 99 others); Wed, 12 Aug 2020 09:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728079AbgHLNwW (ORCPT ); Wed, 12 Aug 2020 09:52:22 -0400 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 804DBC061386 for ; Wed, 12 Aug 2020 06:52:22 -0700 (PDT) Received: by mail-vk1-xa42.google.com with SMTP id x2so514857vkd.8 for ; Wed, 12 Aug 2020 06:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8InXO4IHlwCJ/3LHKr2wC5cvoqCeqc4wxbX8rXjUiPg=; b=N+kSkmDigJZm9bdYj2CCq6cRuTJusMts4MyrYLhaepzh1SFeONS44pX8HelNsXmkpt Sar1XiJvk4yffabWSLuwN6z7snQ+dFjiNxSHvBEnAwmsfgNATsdM1HHNgVZ0t9hUvslm ipOuT2PSmwUT1HfAGS8oOlizyFM9mh0PMN6DY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8InXO4IHlwCJ/3LHKr2wC5cvoqCeqc4wxbX8rXjUiPg=; b=TIX0IF1qq4ZHsUjPnZuQiKwMVLqi99+2Jt688yYk8KmBSW8zuhtn6n5kNR27rY6XR0 Gq0fdU0Amt/dPDO08rFcvP/8IYM6tfbp05L3d/52BEi5n6h38w2hKEvq6h8p1kl8bB72 bH4fDksTxjYtYqrWKqtr+VsAd5G2NmFp5oOft5N+/nQWcVl+OfAfxxfgtq5SWSEot888 fkwiegL/c3jTNyQYSLqW7HeRViyGJTD0VdKvELyAZPs7nZHO7YRlhRWzCm7b0t7/QhrM zs+jYgofyC08Q9FKRPlGl+fa2qN0q/4ZukWO4RbYi/VlrgOcnWMOXsrpGV/FifshhI// B14Q== X-Gm-Message-State: AOAM531+gaQLOcnju1/OSjrHE/RanukGodz3MZsOgR36TFovfZayKeee dporX78mallmzK1eiaU7KyLaG2KFOOA= X-Received: by 2002:a1f:bdcd:: with SMTP id n196mr18488890vkf.10.1597240339254; Wed, 12 Aug 2020 06:52:19 -0700 (PDT) Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com. [209.85.222.47]) by smtp.gmail.com with ESMTPSA id 81sm319013vky.52.2020.08.12.06.52.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2020 06:52:17 -0700 (PDT) Received: by mail-ua1-f47.google.com with SMTP id d20so614539ual.13 for ; Wed, 12 Aug 2020 06:52:17 -0700 (PDT) X-Received: by 2002:ab0:3114:: with SMTP id e20mr27858800ual.104.1597240337098; Wed, 12 Aug 2020 06:52:17 -0700 (PDT) MIME-Version: 1.0 References: <20200215021232.1149-1-mdtipton@codeaurora.org> <158378825407.66766.14135857856613969751@swboyd.mtv.corp.google.com> In-Reply-To: <158378825407.66766.14135857856613969751@swboyd.mtv.corp.google.com> From: Doug Anderson Date: Wed, 12 Aug 2020 06:52:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] clk: qcom: clk-rpmh: Wait for completion when enabling clocks To: Stephen Boyd , "stable@vger.kernel.org" Cc: Mike Tipton , Taniya Das , Bjorn Andersson , Michael Turquette , Andy Gross , linux-arm-msm , linux-clk , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Mar 9, 2020 at 2:11 PM Stephen Boyd wrote: > > Quoting Mike Tipton (2020-02-14 18:12:32) > > The current implementation always uses rpmh_write_async, which doesn't > > wait for completion. That's fine for disable requests since there's no > > immediate need for the clocks and they can be disabled in the > > background. However, for enable requests we need to ensure the clocks > > are actually enabled before returning to the client. Otherwise, clients > > can end up accessing their HW before the necessary clocks are enabled, > > which can lead to bus errors. > > > > Use the synchronous version of this API (rpmh_write) for enable requests > > in the active set to ensure completion. > > > > Completion isn't required for sleep/wake sets, since they don't take > > effect until after we enter sleep. All rpmh requests are automatically > > flushed prior to entering sleep. > > > > Fixes: 9c7e47025a6b ("clk: qcom: clk-rpmh: Add QCOM RPMh clock driver") > > Signed-off-by: Mike Tipton > > --- > > Applied to clk-next but I squashed in some changes to make it easier for > me to read. This landed upstream as commit dad4e7fda4bd ("clk: qcom: clk-rpmh: Wait for completion when enabling clocks") but seemed to have missed stable. Can stable pick it up? It has a Fixes tag so presumably it should be easy to track down where it needs to go. Thanks! -Doug