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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 98782C28CBC for ; Sat, 9 May 2020 15:20:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5DBA920820 for ; Sat, 9 May 2020 15:20:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TgJ8SfzJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DBA920820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kVfXQqJs0Rzv5sci8VaP0zOhkVYqWbAY0oFlh1J8WWw=; b=TgJ8SfzJTUHz9q ey5U82NLPVJLDdQTJzSbMc/FkQIrHJIeQ6KtBcTg4AxgAR/SHlCKXIboML7KftFj6uMjUCB5YAu1b f6WfPGoSRJEDgspWtHDtt5UUVNhkoMIIsKib5SpfV8WriNMhW7VEqfHQjnU7drx+GE+cac/2WGrIu 74qS0+AV9qjfDkZUsW9FNPA0J05aR9ZRT5MW4SxOIak0z7nxuRuowVSMQXrCJCGjD77x97T6t0GGc qYNXZAY6Oj5c9UwlDJWd7rLEuM2DGiISoGwhCp1TclY7sENOPgkwngr5QLNShBtqFn8o3Nf/pSwrU 29OYBrzcWx+1U23Wo/ow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXRH7-0006Rn-Mo; Sat, 09 May 2020 15:20:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jXRH5-0006Ql-8U for linux-arm-kernel@lists.infradead.org; Sat, 09 May 2020 15:20:24 +0000 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 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-Disposition: inline In-Reply-To: <20200509085457.31920-1-joe_zhuchg@126.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200509_082023_341665_63C7F456 X-CRM114-Status: GOOD ( 17.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Zhu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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; } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel