Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4402907ybb; Tue, 14 Apr 2020 06:40:17 -0700 (PDT) X-Google-Smtp-Source: APiQypLC8aPCu7EWcs6Rn8xbhHluaj8DQc+3A1FEfYPQjnuNd/hpjBSpgM/Vfv8vWp69Dnu4hBkL X-Received: by 2002:a50:c042:: with SMTP id u2mr20152095edd.250.1586871617027; Tue, 14 Apr 2020 06:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586871617; cv=none; d=google.com; s=arc-20160816; b=Jo2vJOxwXb7/RV9sc7a1eFIXDiv5lRaro0GwamlIHFRXmAg+Ia3VWXqx6S/W2HQzS3 Icikqct+/6N8Zudvfg8hrcIJXE1gFi3HRTL9Tv0FcAtrclsmzv0n0zGBTRq7EcVjoFWg Xd8OljsSGrull3Pun1PiWNFJrQM/UUjgaZOVyLeC/qQ+4O3uRQyZRh6eOa9/RGfT4syh RpozLQBdRBNtMJuSg9TDqXtYzTQSu7vINku2T1KKFUExy+jQwFOTz62cudb1SHSEUv17 KbSccplSxJRK2fTTTeGmWnl2wvHVNWJVGH+aFucbAB9JVG3sdVzHISsWGpdUk0ZXovF4 dhxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=DkFXK9v0exA4G4YcoWc+xbEiRjzLLK+eOt9DRlAzn/0=; b=G2tu9XdJ4uKDFEfzSS4XFVrHbtUkcGk+0PkJ/f3HUNX73+SZF+3UmeV7xEcj5oPrrJ qe7Me3tLguu9lUYi4/ojzEFJdjl5sJH1Buf6w39BHsOx4gb0QI+ysq917rCYsNNYKWf6 /ueilPHyFkCbjENsCyitsiwPLwvmnjlGZrzB7D07/bm+hE//JI5IL3jPYrnbikGVJUZd e+dvkpcQ+dG4Blx+OSBxZAtm0WQS2ssoJx1uQkQjryIByN+xOXMZvkfKR0GPzXc6FLQW CODZ/QL5ayashoBNOrs5Z7yof9fUi79FegJUdSg8V5CaFRuwm+/J369ykEqH2Y+mKYC1 ZHuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="W/IJ9Qtz"; spf=pass (google.com: best guess record for 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 v5si5496702ejx.10.2020.04.14.06.39.53; Tue, 14 Apr 2020 06:40:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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="W/IJ9Qtz"; spf=pass (google.com: best guess record for 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 S2388934AbgDMVRo (ORCPT + 99 others); Mon, 13 Apr 2020 17:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388926AbgDMVRj (ORCPT ); Mon, 13 Apr 2020 17:17:39 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC835C0A3BE2 for ; Mon, 13 Apr 2020 14:17:38 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id r14so5082381pfl.12 for ; Mon, 13 Apr 2020 14:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=DkFXK9v0exA4G4YcoWc+xbEiRjzLLK+eOt9DRlAzn/0=; b=W/IJ9QtzeOvKUPUFofeH1yOLCsu6opUycc0sSKNqLwR+8qN+dHPEgUb0NDdg0oFUYy wNXoH8vH5uwI5EbvAnjV48iAY3AGoM8NSqSPlUn9R6Zxh46gtVVwInbFrmMikazboleB ByR48x+7toeu9FRO+FZGFHBsnRHm65xR0715k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=DkFXK9v0exA4G4YcoWc+xbEiRjzLLK+eOt9DRlAzn/0=; b=mMoV/ioIkjajY2sCJ6SL8N4OahpOn4pOwyZOaJy8ouzagdCntbTitGGgcByFmr2aUk +MuOvrlQrJ175r0mfsyUXzDE/bW0mj5N9zWBTl/AZ9pR8hKNAit3+EqPpsp/EqbOofeB PePFNRoaBuTud1CCzunbli41/4t/8spauxxA/0k1oc+Jmv/CnIpi80tWay2KFJg3v6m/ GR9rK5rFzQVYxVfjCi8mJwVEPCIGMSJ8JSO7aFBzptWvnuvzDvGVi7jgqC2HA3qlkYDZ CpysaH5YYdoit1zYwuceLR5Ypxi2yyu/pu24hQb9gkpligHC4qiAVYu/3vJ3VV8XVedx qW0A== X-Gm-Message-State: AGi0PubaUORV1EwSn1YRNJYEKC+87b0yzVeTz7puuopoN4rksBZIiu1P VH6LFt/RvIFqCZGIlPBcs9eULzCy1IY= X-Received: by 2002:aa7:8101:: with SMTP id b1mr20026578pfi.322.1586812658266; Mon, 13 Apr 2020 14:17:38 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id x3sm9071634pfq.95.2020.04.13.14.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 14:17:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1586703004-13674-4-git-send-email-mkshah@codeaurora.org> References: <1586703004-13674-1-git-send-email-mkshah@codeaurora.org> <1586703004-13674-4-git-send-email-mkshah@codeaurora.org> Subject: Re: [PATCH v17 3/6] soc: qcom: rpmh: Invalidate SLEEP and WAKE TCSes before flushing new data From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, mka@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah To: Maulik Shah , bjorn.andersson@linaro.org, dianders@chromium.org, evgreen@chromium.org Date: Mon, 13 Apr 2020 14:17:36 -0700 Message-ID: <158681265694.84447.13031031594080430034@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maulik Shah (2020-04-12 07:50:01) > TCSes have previously programmed data when rpmh_flush() is called. > This can cause old data to trigger along with newly flushed. >=20 > Fix this by cleaning SLEEP and WAKE TCSes before new data is flushed. >=20 > With this there is no need to invoke rpmh_rsc_invalidate() call from > rpmh_invalidate(). >=20 > Simplify rpmh_invalidate() by moving invalidate_batch() inside. >=20 > Fixes: 600513dfeef3 ("drivers: qcom: rpmh: cache sleep/wake state request= s") > Signed-off-by: Maulik Shah > Reviewed-by: Douglas Anderson > --- Reviewed-by: Stephen Boyd