Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3260146ybb; Tue, 31 Mar 2020 01:26:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtGox+7x21KTdhhtsPdNDcHuZFaNeNESdkpXkWrQqUJgVKqS7bZejxkQR5HxRltVwpU/8YZ X-Received: by 2002:aca:3302:: with SMTP id z2mr1334215oiz.3.1585643212482; Tue, 31 Mar 2020 01:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585643212; cv=none; d=google.com; s=arc-20160816; b=eppanoMizZJadpiTU6RfgJrf7fr1VIKBMLYvkuGZ4Okqdiq3pJU6qyE0DSYANGCPB/ prIAb6ikNtwKbNIA//eIbVhwnsxA+NqA/TmmC6YOEVnFcf71fTG63+0xvSrufv9eM/CG RRbVXeg0ZdC+y3P/bhsqEtYvQF2kEB2Z9NrEcwrkL9RBDPKyo3Xjm9CJTXjEBisZmLA1 8zWpEEPpZ+J+F+ZeZpmS78nQBSbyeMkoqFc5X3OiGqIz4qbBOUQDVAm7R0MGyROoOpTS 13DoVSSPcNRIncnPWQPcKKpB6AQXqGpVSIWU428XzHL7WZAbOZlrXISKQI5M9VNvcMPe ykOw== 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=d+grUI5NNPTWGY1TGR+JJEiHRsD9XOCJGD3QPIT8u20=; b=kqLyeaQTqU6LPTI0GeqzaJyVPTTKkK3cDEkhQ6OK1J6/ZI/krgi+3gJ/AXC1M1d5OG F2AaK+1jImxc2O/qIAccw9+tdyip0ISh0xWeMa38etiaMUF/Toi8oF/ukhErr6LibGxp FUMDVet0M7JnqB4qkZGsViyMN7R8PX2E0CsFsgNWukxx+uWMvMmHfOkSN2cplBuM3Xm3 PaLxEyNUaazao2MTjMkQSjXHjhsmKC1AHFYUEAJqz76bvI+q/YVTyNHbiHnQXTlFhEUc UZeWfP42amnEpNuB1CThrxd3iA74qJxMo/ZzSNhQXt7KgBkiHFq7kOeYm1JskBnJWNmO fd4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=orbEX5Ts; 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 u7si7342466oor.36.2020.03.31.01.26.39; Tue, 31 Mar 2020 01:26:52 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=orbEX5Ts; 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 S1729795AbgCaI0M (ORCPT + 99 others); Tue, 31 Mar 2020 04:26:12 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:47544 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbgCaI0L (ORCPT ); Tue, 31 Mar 2020 04:26:11 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1585643171; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=d+grUI5NNPTWGY1TGR+JJEiHRsD9XOCJGD3QPIT8u20=; b=orbEX5Tsmfxa1sQb3+BaBRXBluPUpG68W1iBMMhdtwGk4MnyznBdkP1WSi4bJBCYoQYndfws V5nykeMBVOKXHAc8c9JY4fTQ/k1vxHx5UNL+0MTMxs/M38a03RTP4rDrv1i/7LOm4F2/9W2v atkggCZ3hfuGPcEMCIV9NcnFHlc= 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 5e82fea2.7f47f68d8f48-smtp-out-n05; Tue, 31 Mar 2020 08:26:10 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3A037C43637; Tue, 31 Mar 2020 08:26:10 +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 [192.168.43.137] (unknown [106.213.183.81]) (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 4E3A2C433F2; Tue, 31 Mar 2020 08:26:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4E3A2C433F2 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 v14 4/6] soc: qcom: rpmh: Invoke rpmh_flush() for dirty caches To: Doug Anderson Cc: Stephen Boyd , Evan Green , Bjorn Andersson , LKML , linux-arm-msm , Andy Gross , Matthias Kaehlcke , Rajendra Nayak , Lina Iyer , lsrao@codeaurora.org References: <1585244270-637-1-git-send-email-mkshah@codeaurora.org> <1585244270-637-5-git-send-email-mkshah@codeaurora.org> <7bd2c923-4003-a1c4-610f-548e79a94d35@codeaurora.org> From: Maulik Shah Message-ID: Date: Tue, 31 Mar 2020 13:56:00 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 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 Hi, On 3/27/2020 11:52 PM, Doug Anderson wrote: > Hi, > > On Fri, Mar 27, 2020 at 4:00 AM Maulik Shah wrote: >> * @ctrlr: controller making request to flush cached data >> * >> - * Return: -EBUSY if the controller is busy, probably waiting on a response >> - * to a RPMH request sent earlier. >> + * Return: 0 on success, error number otherwise. >> * >> - * This function is always called from the sleep code from the last CPU >> - * that is powering down the entire system. Since no other RPMH API would be >> - * executing at this time, it is safe to run lockless. >> + * This function can either be called from sleep code on the last CPU >> + * (thus no spinlock needed) or with the ctrlr->cache_lock already held. >> >> Now you can remove the "or with the ctrlr->cache_lock already held" >> since it's no longer true. >> >> It can be true for other RSCs, so i kept as it is. > I don't really understand this. The cache_lock is only a concept in > "rpmh.c". How could another RSC grab the cache lock? If nothing > else, can you remove this comment until support for those other RSCs > are added and we can evaluate then? > > -Doug Okay i will remove this comment until support for other RSCs are added. Thanks, Maulik -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation