Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2103420ybv; Sun, 23 Feb 2020 22:49:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwpI9CxJHcrFMR5S67m687TeEfL830kmTaN3FAp0fGyjFwfNMcO5R+q+czzPf0NBOfJb+8y X-Received: by 2002:a05:6830:1f0c:: with SMTP id u12mr38195642otg.253.1582526947200; Sun, 23 Feb 2020 22:49:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582526947; cv=none; d=google.com; s=arc-20160816; b=q86hFnlCCSvCYjjgX5IsJcY58g62bBgzIwBxybIyxL5TuNsatNKZNp/6yLEpK4nHT7 /dQ9OSfH7UDSu/FmDXHuq5qQheYg8WaOdzw4helPnhOd5PlGg2iIk6dRhuMoGyfJK9Ak AA14vWXOnVUyzB7FAoE+js4NEodkKU9Q+2YdJOtjzhNKqbIAwrKbYb9/xJBnBukXZAbu DwvFBoB4rEUnxHyp9P+IcBS+xllrqT5ViA4mkx+j0IQqq4K1eHemT4WX3DxBE5RBTDJ+ PAg28iOhNtBFNCNh7OsILTvY56JFw/rnsGVWD/Nvz9QvzC0YeVivEQzK2HqjVHqtrbyD xP8g== 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=jNRzdYMbdcCKIzk2XTZpJ0LJRkqr4fVarF9hJS2DGuU=; b=UZqrsGR+E0l1qqZeMNp10SSINJwnbgn5B1pPjWfUfcryC42p2fm39lNAM4cKtI4Cdy WSea14J3pfkzkFkKGqMPCX7siDDoBy7lRfq/bG9Nn4hiYUb12Yudex35GpURFwSp0aXx Sb7vpOaBsYoNI980jCkjuuJtP+62FUt9xW2YzOMZZSufB/ZzIFWf03F51x1bWvzPXk8q vXxRWlJ+DVbYD5yIj1eS279H7O8xKcWjLVT4Gg4nazcctQWg3dukivtwxmRDxyPoWR3m Ru+/ygt7iysVKdxm+bhVpKKqVJDfFltC3JkhPWO2/vDXYmSQRsGEeMj8LFXh56QiBOv+ 4AoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=M1wV8zUV; 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 i11si5629220otc.105.2020.02.23.22.48.55; Sun, 23 Feb 2020 22:49:07 -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=M1wV8zUV; 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 S1727240AbgBXGsR (ORCPT + 99 others); Mon, 24 Feb 2020 01:48:17 -0500 Received: from mail27.static.mailgun.info ([104.130.122.27]:40889 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbgBXGsQ (ORCPT ); Mon, 24 Feb 2020 01:48:16 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1582526896; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=jNRzdYMbdcCKIzk2XTZpJ0LJRkqr4fVarF9hJS2DGuU=; b=M1wV8zUViArU0u4sFR5RqFN4owdiyf65rSdrlhbhGH0qaODqwbMhPUDae5Z5JbslmOVvCo9Z pgpIiAXsizcxbJfvXTGZ3qtXMkcZiGRa8CSsYHzUGxol+Wzw+7aKLmc0z3cXXBHaaPcXXUyy MQ4wG84PnreeO4iNI/oDMtJa49c= X-Mailgun-Sending-Ip: 104.130.122.27 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 5e5371ac.7f9514009a40-smtp-out-n01; Mon, 24 Feb 2020 06:48:12 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5E5AEC4479C; Mon, 24 Feb 2020 06:48:11 +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.12.145] (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: lsrao) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8E23BC43383; Mon, 24 Feb 2020 06:48:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8E23BC43383 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=lsrao@codeaurora.org Subject: Re: [PATCH v6 3/3] soc: qcom: rpmh: Invoke rpmh_flush for dirty caches To: Maulik Shah , swboyd@chromium.org, mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org References: <1582277527-19638-1-git-send-email-mkshah@codeaurora.org> <1582277527-19638-4-git-send-email-mkshah@codeaurora.org> From: Srinivas Rao L Message-ID: <97325f1e-e7dc-0dea-4468-c5d210ceb45c@codeaurora.org> Date: Mon, 24 Feb 2020 12:18:05 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <1582277527-19638-4-git-send-email-mkshah@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As power domain support is dropped in v6 , please update commit text accordingly. Post the update of commit text, you can add my reviewed by. Reviewed-by: Srinivas Rao L Regards, Srinivas. On 2/21/2020 3:02 PM, Maulik Shah wrote: > Add changes to invoke rpmh flush when the data in cache is dirty. > > This is done only if OSI is not supported in PSCI. If OSI is supported > rpmh_flush will get invoked by power domain off call when the last cpu > in the domain is going to power collapse. > > Signed-off-by: Maulik Shah > --- > drivers/soc/qcom/rpmh.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c > index 83ba4e0..839af8d 100644 > --- a/drivers/soc/qcom/rpmh.c > +++ b/drivers/soc/qcom/rpmh.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -163,6 +164,9 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr, > unlock: > spin_unlock_irqrestore(&ctrlr->cache_lock, flags); > > + if (ctrlr->dirty && !psci_has_osi_support()) > + return rpmh_flush(ctrlr) ? ERR_PTR(-EINVAL) : req; > + > return req; > } > > @@ -391,6 +395,8 @@ int rpmh_write_batch(const struct device *dev, enum rpmh_state state, > > if (state != RPMH_ACTIVE_ONLY_STATE) { > cache_batch(ctrlr, req); > + if (!psci_has_osi_support()) > + return rpmh_flush(ctrlr); > return 0; > } > -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation