Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp475964ybk; Sat, 9 May 2020 08:24:30 -0700 (PDT) X-Google-Smtp-Source: APiQypI1lTdonnMYOEH03oL4qdNUpH/aNEoWTELlYkCbnZ16ZagBYrXb/aJITSlIXLaXReNl4b2x X-Received: by 2002:a17:906:7ac8:: with SMTP id k8mr6627355ejo.235.1589037870676; Sat, 09 May 2020 08:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589037870; cv=none; d=google.com; s=arc-20160816; b=GJissBj1u4RkUKT1PbmGM7yBNhn3QKPxfxBtZz814p7bUXhiZlvu4s1mIioZCy2McS 7btAr1pfUAQd/tppljavES2h60XecDKfBaZkWOEha+Sir0IuGRdtUj6MLwJwGBYKkmFy 4clBn06TZUPQnKuK2mpXJ52R/xUeFc5+X2vvEtDx2kerGv5qls83KJp25kWZ3jpQCpZX VQ+5qI9yANyja0XHY0ND5TgTkHIXm7V7DMWEgBeNN1W5Mu46Bb5b9WB1XACR+LHbtJwR xfR/BxwnwkTbR7mDfyvBCXn+ix6yqDeo61i1wZXEQJ3FvCZ/lTeMIVjSoWX98FxR5lkP RR6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QtoWs7V9CNEzabuw+nTpOnOBt4Ruf3MhkVwuGyG8c5o=; b=MMVRAAy8hRT0QXlhWFdzN7KMtTpAM7Jb2r0r8hC+B6sBdRixN1ouMbyakaSRR/7XOG nQXeHNLInsXs4KLo+fFE7x24jvFODQKI5KZpRUQO3Nr4cuTdsrfARR+frqz8+i19Doiy iP+C4uMAETr0Z/fpezVaH1XBM01lLZI9JrJsAxfL1wIhP5e8IxusEG9c3zloIVMabA7m B6S+ioFG51+60ahdOpQydVQeJGL3P3lCd5y2HiKedx04okInCdrV6ddYkP+MRN0zV2lb f31UdPCKqxLJ+BKFLo5wj/4EdXB8nlbdINkTeTGgXrMN5EHTyifu3/CbonNF7FOlDKKU iJDw== ARC-Authentication-Results: i=1; mx.google.com; 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 t9si2835977ejr.422.2020.05.09.08.24.07; Sat, 09 May 2020 08:24:30 -0700 (PDT) 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; 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 S1728073AbgEIPUV (ORCPT + 99 others); Sat, 9 May 2020 11:20:21 -0400 Received: from foss.arm.com ([217.140.110.172]:59922 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbgEIPUV (ORCPT ); Sat, 9 May 2020 11:20:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7102E30E; Sat, 9 May 2020 08:20:20 -0700 (PDT) Received: from bogus (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C1BC3F305; Sat, 9 May 2020 08:20:18 -0700 (PDT) Date: Sat, 9 May 2020 16:20:07 +0100 From: Sudeep Holla To: joe_zhuchg@126.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sudeep Holla , Joe Zhu Subject: Re: [PATCH 1/1] firmware: arm_scmi/mailbox: ignore notification for tx done using irq Message-ID: <20200509152007.GA18877@bogus> References: <20200509085457.31920-1-joe_zhuchg@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200509085457.31920-1-joe_zhuchg@126.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 09, 2020 at 04:54:57PM +0800, joe_zhuchg@126.com wrote: > From: Joe Zhu > > If mailbox uses IRQ method, it already notified framework with > mbox_chan_txdone() in ISR. > > Signed-off-by: Joe Zhu > --- > drivers/firmware/arm_scmi/mailbox.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c > index 73077bbc4ad9..303a5dc42429 100644 > --- a/drivers/firmware/arm_scmi/mailbox.c > +++ b/drivers/firmware/arm_scmi/mailbox.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include This is an indication that something is wrong. The mailbox controller and client interfaces are very clear. You need to use mailbox controller interface when implementing a mailbox controller and use only client interface when implementing a mailbox client. > #include > #include > #include > @@ -147,7 +148,8 @@ static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret) > * Unfortunately, we have to kick the mailbox framework after we have > * received our message. > */ > - mbox_client_txdone(smbox->chan, ret); > + if (!smbox->chan->mbox->txdone_irq) > + mbox_client_txdone(smbox->chan, ret); If this patch is to avoid getting "Client can't run the TX ticker" error messages, then you make need to fix that with something like below: Regards, Sudeep -->8 diff --git i/drivers/mailbox/mailbox.c w/drivers/mailbox/mailbox.c index 0b821a5b2db8..5a78a0adcce4 100644 --- i/drivers/mailbox/mailbox.c +++ w/drivers/mailbox/mailbox.c @@ -189,7 +189,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_txdone); void mbox_client_txdone(struct mbox_chan *chan, int r) { if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) { - dev_err(chan->mbox->dev, "Client can't run the TX ticker\n"); + if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ))) + dev_err(chan->mbox->dev, + "Client can't run the TX ticker\n"); return; }