Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp82287ybh; Mon, 9 Mar 2020 16:44:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuNUqQqmzQQtBAqFtpCos4CPG+UIuZsmmDQmwTvXH+xWbEotxL9b9jOk1HrqDVxnaFBcKHF X-Received: by 2002:a9d:4d85:: with SMTP id u5mr6511782otk.128.1583797465340; Mon, 09 Mar 2020 16:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583797465; cv=none; d=google.com; s=arc-20160816; b=OlS+zwI3Hzc/09vrcdCbI8yfcTfubH1rriRgcvQSk+QrfVq6jmvMsTgPZkKLKFoyhq S4Qo99FO9G0NubmLvq8PuScYNOt3AnEfGyjkQs1UmKJkoJlG0ew+SUJC/YDHdr5mNYy4 frdFOE+lfjof5f19CNdQZzxhrjp2FVwKazyntDtaLRlS5BCHLGzfBrocg8XTeK+Gfv7P 94DCFMpoa3l6Bn5tBPC52hG4J8z9gTV22dcDz1y+KSA3F3Cb13XsvuEmE7A14K+Nw8LK Yd7pjRMSDUaoLwJ4ZHk80bnrymYuwx7dM+Jigu0e4PM2g0Ejm/teI4Ok1eaPaF/jQ5lo vVcA== 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=HbFlXIeA0nZ82kqTFusW9Y5ddM630bUBZPbaTnSWK9Q=; b=Gw14r8wi9Lt1BoAMKEoXpvdK0zC57d6Ddl/Z0DRVm0hw76KSanBCFo3NgNwu7QsgE3 iST2MDHcB4wB6uuMpE97UhjUH7tS+Vqk3xU35gcBAVlsQOvtdtfMiGwKYgYRZ2cGWFfq qLmC4RuUra+WaldFdxGoOtypG+KmBZw7aaBZuZO0K+uq83ODI4Ku64n28bACwWSSF1cL isjbcvtzeE1J2wnPDndoD9n2eysiDNIajQbKdp+B2ygAevvILHDVZgIgPPC55QWu4xoy JDwuGXZ92laI3dNED2PSe5frYjAQYriVxDsT0ARRVQ75HYXIvZFCT1OJuCPGBJy0Jkes pxqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EMrra8Ta; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x20si4531252oic.75.2020.03.09.16.44.13; Mon, 09 Mar 2020 16:44:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EMrra8Ta; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727469AbgCIXma (ORCPT + 99 others); Mon, 9 Mar 2020 19:42:30 -0400 Received: from mail-ua1-f67.google.com ([209.85.222.67]:38602 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbgCIXma (ORCPT ); Mon, 9 Mar 2020 19:42:30 -0400 Received: by mail-ua1-f67.google.com with SMTP id y3so4012333uaq.5 for ; Mon, 09 Mar 2020 16:42:29 -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=HbFlXIeA0nZ82kqTFusW9Y5ddM630bUBZPbaTnSWK9Q=; b=EMrra8TaXWr/XpsjFWwAXJ9M92aRqXDRr5qcC8JIRzVmcEK13C29b79SejteQwZFSv KyRd3SxhqJinTM29vmxs9cL6TpTO+mZPsKy7TfCdcle2Ekttc3FrSeII9T2wZ6/knwXv 3y6ciY0SDUjk+wP55PranRh+l1WBiTPSuAscc= 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=HbFlXIeA0nZ82kqTFusW9Y5ddM630bUBZPbaTnSWK9Q=; b=oJybNvM8uslhoribO5dqn9n2mPr7VcCKefH+urJayJLOqQblYMihzimeBkzSq0oD8k XmQrdFzogWSIx23kAls8Y/CbNNeMMUeYI+A6IPqlC6mIBVpLpz0ABijH+70w0trpWW9p k92w1DjK6SEy7sC9ctShYkDQ3w2PBdJ06KohQDv9oQ/8BpPFsi8bUD/m3rw2FU0UvkPc iYEq5YOtZRK4OyqoQjyHZNXhQeEPAwFLPEiyN7KU9luCXeqvDwYFBfpnvaYaf07czuwq icAu4vCyE74XzfqysIhIdZNcFy8Ee+hRT5jymouaEdbEjKsynH763P7unhjKXLmALP2U hw/g== X-Gm-Message-State: ANhLgQ1wpllD7iL5mhU+5T9e4UwVpAEyhqMH48IUtIPtIxhGZ8clTT9H r7XYpEGfzLMcqFlKOa3M7anPx6c/mwE= X-Received: by 2002:ab0:44e4:: with SMTP id n91mr4670593uan.88.1583797348257; Mon, 09 Mar 2020 16:42:28 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id m11sm12853911vkm.52.2020.03.09.16.42.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 16:42:27 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id d19so3997010uak.8 for ; Mon, 09 Mar 2020 16:42:27 -0700 (PDT) X-Received: by 2002:a9f:2478:: with SMTP id 111mr3162014uaq.0.1583797346690; Mon, 09 Mar 2020 16:42:26 -0700 (PDT) MIME-Version: 1.0 References: <1583746236-13325-1-git-send-email-mkshah@codeaurora.org> <1583746236-13325-3-git-send-email-mkshah@codeaurora.org> In-Reply-To: <1583746236-13325-3-git-send-email-mkshah@codeaurora.org> From: Doug Anderson Date: Mon, 9 Mar 2020 16:42:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v13 2/5] soc: qcom: rpmh: Update dirty flag only when data changes To: Maulik Shah Cc: Stephen Boyd , Matthias Kaehlcke , Evan Green , Bjorn Andersson , LKML , linux-arm-msm , Andy Gross , Rajendra Nayak , Lina Iyer , lsrao@codeaurora.org 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:31 AM Maulik Shah wrote: > > Currently rpmh ctrlr dirty flag is set for all cases regardless of data > is really changed or not. Add changes to update dirty flag when data is > changed to newer values. Update dirty flag everytime when data in batch > cache is updated since rpmh_flush() may get invoked from any CPU instead > of only last CPU going to low power mode. > > Also move dirty flag updates to happen from within cache_lock and remove > unnecessary INIT_LIST_HEAD() call and a default case from switch. > > Fixes: 600513dfeef3 ("drivers: qcom: rpmh: cache sleep/wake state requests") > Signed-off-by: Maulik Shah > Reviewed-by: Srinivas Rao L > Reviewed-by: Evan Green > --- > drivers/soc/qcom/rpmh.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) Reviewed-by: Douglas Anderson