Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp146332pxu; Thu, 7 Jan 2021 00:40:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJviHVOtCxVYxgjYlIVdbfgGHP9/qYP0ssebSUKR/dszQT7k0LTcWGg4RevBYcO1NTxOGa X-Received: by 2002:a17:906:adce:: with SMTP id lb14mr5545543ejb.502.1610008802662; Thu, 07 Jan 2021 00:40:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610008802; cv=none; d=google.com; s=arc-20160816; b=E8rF4xgoTbGu/Vv8VX33FR9+JwtvJuxTQlWFpxaEe28jlay4OGt4PDJJcApxQLOwl0 KFZSAs0Gf4uwYZH3L8uZg5QD+mKhhffBj4Kg2jJqchCe6gdxL04opqaoZFbzGVsDybg8 vYA+QVlG1ugpOCVDXNEOoYeVKge7amvaeDg5C8rqGexBhTfzavX0RyARl7uTHCixL//l dspfcjnY3t6UF5Juf209jp7FtgZYwYgX6W+Mpf4J1RSlfe1HvJBfS4K1wa3tfNJzFGWa m4VE5uci8LAxe+i9mQOUhGMRS9F3hykfZ8QsnzquryLEK5NleRYLKz5X0YY9t+IE7Kbs VCHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=DbRjArTSerMJL/6H69dAmMZAuylzmFnWCTAs/XAJGxM=; b=lEq1DxEBBEpAaS+MAo5NHh8aX1YJgRcz4H7gPNPpRtkzwmgpBpjxxOFUyuNAxigYX1 AfpqGefcrYjYqsk9G4XKAP8VRDIQ08mHn/yx95Qil9ibYvftvuDTbDpbg1y3fJ4IyOF6 +vAdPLhK0SK0IkzVhm3NvmcKy0HDQe9a0aRT3yoYt2x/pbXVXYsk4dbNqCc7IZHCjKt8 bDccAT0gHHPWYboTmZr3bXOY199H/70Vw650MlngDNCTjv3Amsb4TiqhXV4/4C107F0B AYzYKuRMGyR7QDqYEP5SpT/mO6b59xjGzA3UGncnQd/WyD6W2/qUaI0r1nVvoP30b6kp aknw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=EqSs6go8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ak15si1908208ejc.654.2021.01.07.00.39.39; Thu, 07 Jan 2021 00:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=EqSs6go8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbhAGIi5 (ORCPT + 99 others); Thu, 7 Jan 2021 03:38:57 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:48923 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbhAGIi5 (ORCPT ); Thu, 7 Jan 2021 03:38:57 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610008718; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=DbRjArTSerMJL/6H69dAmMZAuylzmFnWCTAs/XAJGxM=; b=EqSs6go8x97KMb3wNmxCYWn+QAOaDiJvexy3K21/HYgmLHgWfa79It3abWKkEVB2FnFAsKqs 3fBBiF7tt6OWdK5x1P4r3kUkAYoNgj5ieKWPkhRw+A74ryEQnvMFu6dWuSRruOVAOXGAKEf7 kllynTMtYawzUgUEElyO4U/RY3w= X-Mailgun-Sending-Ip: 69.72.43.15 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 smtp-out-n08.prod.us-east-1.postgun.com with SMTP id 5ff6c86826530504c40a628a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 07 Jan 2021 08:38:00 GMT Sender: mkshah=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7C422C433C6; Thu, 7 Jan 2021 08:37:59 +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=-3.2 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.29.129] (unknown [49.36.65.173]) (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 A3070C433CA; Thu, 7 Jan 2021 08:37:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A3070C433CA 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=fail smtp.mailfrom=mkshah@codeaurora.org Subject: Re: [PATCH v2] soc: qcom: rpmh: Remove serialization of TCS commands To: Doug Anderson Cc: Bjorn Andersson , Andy Gross , LKML , linux-arm-msm , Rajendra Nayak , Lina Iyer , Srinivas Rao L , Stephen Boyd References: <1606203086-31218-1-git-send-email-mkshah@codeaurora.org> From: Maulik Shah Message-ID: Date: Thu, 7 Jan 2021 14:07:52 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Doug, On 12/4/2020 3:14 AM, Doug Anderson wrote: > Hi, > > On Mon, Nov 23, 2020 at 11:32 PM Maulik Shah wrote: >> @@ -423,8 +422,7 @@ static irqreturn_t tcs_tx_done(int irq, void *p) >> cmd = &req->cmds[j]; >> sts = read_tcs_cmd(drv, RSC_DRV_CMD_STATUS, i, j); >> if (!(sts & CMD_STATUS_ISSUED) || >> - ((req->wait_for_compl || cmd->wait) && >> - !(sts & CMD_STATUS_COMPL))) { >> + (cmd->wait && !(sts & CMD_STATUS_COMPL))) { >> pr_err("Incomplete request: %s: addr=%#x data=%#x", >> drv->name, cmd->addr, cmd->data); >> err = -EIO; > In my review of v1 all those months ago, the way we left things was > that I disagreed with this part of the patch, and I still do. I think > you should leave things the way they were in tcs_tx_done(). Copying > my un-responded-to comments from v1 here for you: > > In your patch in __tcs_buffer_write(), if "wait_for_compl" is set then > "CMD_MSGID_RESP_REQ" will be added for every message in the request, > right? That's because you have this bit of code: > > /* Convert all commands to RR when the request has wait_for_compl set */ > cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0; > > That means that if _either_ "cmd->wait" or "req->wait_for_compl" is > set then you expect the "sts" to have "CMD_STATUS_COMPL", right? > That's exactly the code that used to be there. > > Said another way, if "req->wait_for_compl" was set then it's an error > if any of our commands are missing the "CMD_STATUS_COMPL" bit, right? > > >> @@ -30,7 +30,7 @@ enum rpmh_state { >> * >> * @addr: the address of the resource slv_id:18:16 | offset:0:15 >> * @data: the resource state request >> - * @wait: wait for this request to be complete before sending the next >> + * @wait: ensure that this command is complete before returning > In my response to v1 I suggested that a comment would be nice here. > Something akin to: > > Setting "wait" here only makes sense in the batch case for active-only > transfers. > > This is because: > * rpmh_write_async() - There's no callback and rpmh_write_async() > doesn't set the "completion" to anything so there's nobody that cares > at all > > * DEFINE_RPMH_MSG_ONSTACK - always sets wait_for_compl. > > -Doug Addressed both comments and sent v3. Thanks, Maulik -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation