From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C551C2D0EE for ; Tue, 31 Mar 2020 08:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F64C207FF for ; Tue, 31 Mar 2020 08:26:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="orbEX5Ts" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbgCaI0O (ORCPT ); Tue, 31 Mar 2020 04:26:14 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:37157 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgCaI0M (ORCPT ); Tue, 31 Mar 2020 04:26:12 -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.27 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== 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) 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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