lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5564B50DC8FF8945812290C7B168B6C770141CDF@SHASXM03.verisilicon.com>
Date:   Mon, 11 May 2020 00:52:33 +0000
From:   "Zhu, Joe" <Chunguang.Zhu@...isilicon.com>
To:     Sudeep Holla <sudeep.holla@....com>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 答复: [PATCH 1/1] firmware: arm_scmi/mailbox: ignore notification for tx done using irq

Hi Sudeep,
    Yes, mailbox client does not need to know how controller implemented. I will check with mailbox driver. Thanks!


Regards,
Joe


-----邮件原件-----
发件人: Sudeep Holla [mailto:sudeep.holla@....com] 
发送时间: 2020年5月9日 23:20
收件人: joe_zhuchg@....com
抄送: linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; Sudeep Holla; Zhu, Joe
主题: Re: [PATCH 1/1] firmware: arm_scmi/mailbox: ignore notification for tx done using irq

On Sat, May 09, 2020 at 04:54:57PM +0800, joe_zhuchg@....com wrote:
> From: Joe Zhu <Chunguang.Zhu@...isilicon.com>
> 
> If mailbox uses IRQ method, it already notified framework with
> mbox_chan_txdone() in ISR.
> 
> Signed-off-by: Joe Zhu <Chunguang.Zhu@...isilicon.com>
> ---
>  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 <linux/err.h>
>  #include <linux/device.h>
>  #include <linux/mailbox_client.h>
> +#include <linux/mailbox_controller.h>

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 <linux/of.h>
>  #include <linux/of_address.h>
>  #include <linux/slab.h>
> @@ -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;
        }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ