Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp70469ybv; Tue, 4 Feb 2020 16:37:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxYPoAGfEUKWBVrJphZ3xDzn9/5ZwnBoa06gI1uvcP/YCUn10dBBia95gnWnOBpROf3NajV X-Received: by 2002:a05:6808:64e:: with SMTP id z14mr1105317oih.79.1580863073327; Tue, 04 Feb 2020 16:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580863073; cv=none; d=google.com; s=arc-20160816; b=iuq1ZbCGvylLXyAIAmMhiWzrT0IF4uNqWYGdGcObdK4Zpk6tPrQRqd3kdUK/3AZU2A fVJOAPKHzV1aptAjejI2zaWU5WTwpPBcFh2ktVtwIQzx0ryx7SqZBA4h5tNGMHti0s6t FV/jgcygH+sc+nHoNMuVlLNmQbXcANvC7H2FAY5fGnGBuTe118csRR/4YHSdUivw1pC8 Q6NfNo69YVUbAr/R7tIvQXHrZ1top8JrHcp7dNBWdg9fBcskTjuMoiAQb6Edg7TUo8e8 JtyMdnxgeu3dY0uV+tZhW/z2SerGhls+KAJuJnwOZE0R3gt6+lYHedC44a59UkG5vlez gw7w== 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=MjWXCXEdOOwOMkJJTNAHcUDq4zVsPSajy/GXrZmEiag=; b=1FcrJzbEcarZNoVtqJQgHDw8gbXNxnEOuXBtKvmpJq0uI9meFKvMkP5nueHWK/vBLT 31z9loG42DKPGFXGz5TPUfBty6zLoZrHi5CA0CbIL+Omoqh7O/PBRceaXU46nGlXiqIq usU7S8M8O50uoBjQye474AHHlaQFEVUO4MwRjHj90OPmDNwKF8EQQ3UEgfB3+qkB0mwk 35W8ic1hV2Mq6A2Fgzfsyo19bMQ3ko8SSdipOnpYWFLg8QTNEWDRqVwiHZ6tQ3S2RrpV YhOTqTUNzsMHuSqJof/r0GdQnPY600uXiZL0zIY86lLcTEKEDYDVy6qpyjW38UcR0Sc5 CZ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VT9hTnG+; 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 r12si12220207otq.156.2020.02.04.16.37.41; Tue, 04 Feb 2020 16:37:53 -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=pass header.i=@chromium.org header.s=google header.b=VT9hTnG+; 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 S1727810AbgBEAge (ORCPT + 99 others); Tue, 4 Feb 2020 19:36:34 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36437 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbgBEAge (ORCPT ); Tue, 4 Feb 2020 19:36:34 -0500 Received: by mail-lj1-f195.google.com with SMTP id r19so541455ljg.3 for ; Tue, 04 Feb 2020 16:36:33 -0800 (PST) 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=MjWXCXEdOOwOMkJJTNAHcUDq4zVsPSajy/GXrZmEiag=; b=VT9hTnG+dCpN1oUkTy15tykgYxQNI3vmF23pTk/136wicIDfFXnU1lBcH6cchRsKpj bSE7kppl3FvhhKU2qOSlNuQ01A213YcbbvQtFqQMtuUoH8Pc7or8v4KxolAK6vp21o8N AQKDmeLLPLIAIT3qI/FHSsJCREix1XNwkRx2I= 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=MjWXCXEdOOwOMkJJTNAHcUDq4zVsPSajy/GXrZmEiag=; b=Pj6fN02I6tqlZYoGb4K1Xfyi3HpicFALLnRr//W7XKko3fNzfhDQOQDJXjRj1qVIfR p0SnySY3OPLylPovLO1wNJYgtWlT2wNrwa/14916e8CPudI4QrpITH1/lvi5hkyj86+l 7ERazLXc8m8Es1ccJT/bhYHwHwJ4Uw+AGUD46ycYGtG/y93zTS2AgCTV3Hood+g5tVnn m+Pg9I4YfEfvb/XYWgR+T84rT9cHCF71OYByy73zEMtIoI5jBQqRaU5z/YmTleKRh4GS r7oQ1BO676n9xCUvSH+IwJi9I3/PrcrhqPcnuvkjyRTW3tl4euCl28T5jktVH8JR+Mwx h6eA== X-Gm-Message-State: APjAAAUFwjD7NzRZPtXJFd2QYU0/7VJC51muPZgzueM66szbAbxgWVP+ Snfu7YfFdGPDBzVtfVMORMFGJbDkBh0= X-Received: by 2002:a2e:80cc:: with SMTP id r12mr18013940ljg.154.1580862991840; Tue, 04 Feb 2020 16:36:31 -0800 (PST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id 135sm11336337lfb.28.2020.02.04.16.36.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2020 16:36:31 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id q8so552441ljb.2 for ; Tue, 04 Feb 2020 16:36:30 -0800 (PST) X-Received: by 2002:a2e:3e10:: with SMTP id l16mr18417534lja.286.1580862990119; Tue, 04 Feb 2020 16:36:30 -0800 (PST) MIME-Version: 1.0 References: <1580796831-18996-1-git-send-email-mkshah@codeaurora.org> <1580796831-18996-2-git-send-email-mkshah@codeaurora.org> In-Reply-To: <1580796831-18996-2-git-send-email-mkshah@codeaurora.org> From: Evan Green Date: Tue, 4 Feb 2020 16:35:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] soc: qcom: rpmh: Update dirty flag only when data changes To: Maulik Shah Cc: Bjorn Andersson , Andy Gross , linux-arm-msm , LKML , Stephen Boyd , Doug Anderson , 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 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".