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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c297dd68-f331-4c7f-a740-8fe722b347b0@ti.com>
Date: Mon, 1 Apr 2024 18:47:05 -0500
From: Andrew Davis <afd@...com>
To: Hari Nagalla <hnagalla@...com>, Jassi Brar <jassisinghbrar@...il.com>,
        Nick Saulnier <nsaulnier@...com>,
        Bjorn Andersson <andersson@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

On 4/1/24 6:31 PM, Hari Nagalla wrote:
> On 3/25/24 12:20, Andrew Davis wrote:
>>   static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)
>>   {
>> -    int ret = -EBUSY;
>> +    if (mbox_fifo_full(mbox))
>> +        return -EBUSY;
>> -    if (!mbox_fifo_full(mbox)) {
>> -        omap_mbox_enable_irq(mbox, IRQ_RX);
>> -        mbox_fifo_write(mbox, msg);
>> -        ret = 0;
>> -        omap_mbox_disable_irq(mbox, IRQ_RX);
>> +    omap_mbox_enable_irq(mbox, IRQ_RX);
>> +    mbox_fifo_write(mbox, msg);
>> +    omap_mbox_disable_irq(mbox, IRQ_RX);
>> -        /* we must read and ack the interrupt directly from here */
>> -        mbox_fifo_read(mbox);
>> -        ack_mbox_irq(mbox, IRQ_RX);
>> -    }
>> +    /* we must read and ack the interrupt directly from here */
>> +    mbox_fifo_read(mbox);
>> +    ack_mbox_irq(mbox, IRQ_RX);
>> -    return ret;
>> +    return 0;
>>   }
> Is n't the interrupt supposed to be IRQ_TX above? i.e TX ready signal?

Hmm, could be, but this patch doesn't actually change anything, only moves code
around for readability. So if we were are ack'ing the wrong interrupt, then it
was wrong before. We should check that and fix it if needed in a follow up patch.

Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ