Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp230447ybv; Tue, 4 Feb 2020 20:16:29 -0800 (PST) X-Google-Smtp-Source: APXvYqz+CRQ+ATulTIJeWIYL5CEzLCKiZzIPr9MA+VLI0fqSPH36NOLv6zJea1qvcAoOKyoPstlz X-Received: by 2002:a05:6830:2110:: with SMTP id i16mr24108072otc.337.1580876189655; Tue, 04 Feb 2020 20:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580876189; cv=none; d=google.com; s=arc-20160816; b=SoRq/OalRrpUBiL2ZVFKb1AGfrtne6KUrSL3PodVoERjt6auTZFowOl2R3Z/Avplmx siUoIfAEcnw7QELz9mD7dlC2l6sMvVr+/loYX55/GiDf2CdXHX7FwmLGkp8ZW2fkSty7 zkyzJjYIengWIs4NnveRhSVyhjzn0YfpOTiUVLZGEWwV+qWt11EUvPBx351AaZJ0ofCz F47cMqikWcOrXrtAvOS5FovYg7njTK0911RiadUdIMWf6X4xmW+lx7LNFffMIjxQI182 Pp4MkSHvO5fhKzxqgPNZYCh+zkgWwrz0fmlZZUGXgTiFf4VHbsPJKjymalaQYiOCIPDA w6VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=mFggojvO9f3G3VuMRvXmpQHB4tK1ztWgPh7NXm+Cy0E=; b=p0DrvewM/iJOZa3Q/o6mldYu+LOTxtc6LgTxHn0BP5sEAWyuxtHjzjJE/4suCmGLix bIPW4CyLYO+gjCl/lSeyCH5LcykDjy3ZcrFwN6BApYdJU/QxzOa0v3Nd3wb0Ry9Xwacy CT/8Rs8ZksG+QMwpvRzKOfoSm10Gk5TIxYGdi6JbtvsXoCvlWiEMSJXMND414kARB+om 6nYu77rgMVYCGjLHtva+zFCXbseJGOOxkc6wEEUw5NKjNhNTbyhzZRiAg/LyeRf6RbBY OYI0LZXvh3NLfOmmoyUQsXt31+AIs/zgdxBwjGndWSAR/9JaNSeLZQOuNVylG3K83iHu GPmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=NXwQDWNR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r26si9208199otk.79.2020.02.04.20.16.16; Tue, 04 Feb 2020 20:16:29 -0800 (PST) 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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=NXwQDWNR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbgBEEOx (ORCPT + 99 others); Tue, 4 Feb 2020 23:14:53 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:51183 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727832AbgBEEOx (ORCPT ); Tue, 4 Feb 2020 23:14:53 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1580876092; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=mFggojvO9f3G3VuMRvXmpQHB4tK1ztWgPh7NXm+Cy0E=; b=NXwQDWNRDcFhomxHZCrDSV3y2gvqbOgNS0UoMqtWRP8htthqxhdltSUkvkWWkeL3Q2jjScHF T8s7noB0fJ/VPbHtsQRI+qqatFLl7SwothdW+SZ/GWybLIAqJ6Ur07H/8CuD+xJl7w9fEm13 +pe/y0HvEcqNrotKA4EAf9s1O60= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e3a4138.7f291dc1b768-smtp-out-n03; Wed, 05 Feb 2020 04:14:48 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2855EC433CB; Wed, 5 Feb 2020 04:14:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.206.13.37] (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id 87064C43383; Wed, 5 Feb 2020 04:14:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 87064C43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=mkshah@codeaurora.org Subject: Re: [PATCH 1/3] soc: qcom: rpmh: Update dirty flag only when data changes To: Evan Green Cc: Bjorn Andersson , Andy Gross , linux-arm-msm , LKML , Stephen Boyd , Doug Anderson , Rajendra Nayak , Lina Iyer , lsrao@codeaurora.org References: <1580796831-18996-1-git-send-email-mkshah@codeaurora.org> <1580796831-18996-2-git-send-email-mkshah@codeaurora.org> From: Maulik Shah Message-ID: Date: Wed, 5 Feb 2020 09:44:41 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/5/2020 6:05 AM, Evan Green wrote: > On Mon, Feb 3, 2020 at 10:14 PM 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 it when data is updated to new values. >> >> Signed-off-by: Maulik Shah >> --- >> drivers/soc/qcom/rpmh.c | 15 +++++++++++---- >> 1 file changed, 11 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c >> index 035091f..c3d6f00 100644 >> --- a/drivers/soc/qcom/rpmh.c >> +++ b/drivers/soc/qcom/rpmh.c >> @@ -139,20 +139,27 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr, >> existing: >> switch (state) { >> case RPMH_ACTIVE_ONLY_STATE: >> - if (req->sleep_val != UINT_MAX) >> + if (req->sleep_val != UINT_MAX) { >> req->wake_val = cmd->data; >> + ctrlr->dirty = true; >> + } > Don't you need to set dirty = true for ACTIVE_ONLY state always? The > conditional is just saying "if nobody set a sleep vote, then maintain > this vote when we wake back up". The ACTIVE_ONLY vote is cached as wake_val to be apply when wakeup happens. In case value didn't change,wake_val is still same as older value and there is no need to mark the entire cache as dirty. -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation