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]
Date:	Wed, 22 Apr 2015 09:13:15 +0900
From:	Jassi Brar <jaswinder.singh@...aro.org>
To:	Feng Kan <fkan@....com>
Cc:	Jassi Brar <jassisinghbrar@...il.com>, patches <patches@....com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/3] mailbox: add support for APM X-Gene platform mailbox driver

On 22 April 2015 at 06:14, Feng Kan <fkan@....com> wrote:
> On Tue, Apr 21, 2015 at 12:42 AM, Jassi Brar <jassisinghbrar@...il.com> wrote:
>>
>>> +/* Configuration and Status Registers */
>>> +struct slimpro_mbox_reg {
>>> +       u32 in;
>>> +       u32 din0;
>>> +       u32 din1;
>>> +       u32 rsvd1;
>>> +       u32 out;
>>> +       u32 dout0;
>>> +       u32 dout1;
>>> +       u32 rsvd2;
>>> +       u32 status;
>>> +       u32 statusmask;
>>> +};
>>> +
>> Why not the normal way of defining offset macros, like most drivers do?
> I personally don't prefer one way over another, let me know if you want me
> to change to use defines.
>
Yes please.

>>
>>> +               mbox_chan_received_data(mb_chan->chan, mb_chan->rx_msg);
>>> +       }
>>> +
>>> +       return IRQ_HANDLED;
>>> +}
>>> +
>>> +static int slimpro_mbox_send_data(struct mbox_chan *chan, void *msg)
>>> +{
>>> +       struct slimpro_mbox_chan *mb_chan = to_slimpro_mbox_chan(chan);
>>> +
>>> +       mb_chan_send_msg(mb_chan, msg);
>>> +       return 0;
>>> +}
>>> +
>>> +static int slimpro_mbox_startup(struct mbox_chan *chan)
>>> +{
>>> +       struct slimpro_mbox_chan *mb_chan = to_slimpro_mbox_chan(chan);
>>> +       int rc;
>>> +
>>> +       rc = devm_request_irq(mb_chan->dev, mb_chan->irq, slimpro_mbox_irq, 0,
>>> +                             MBOX_CON_NAME, mb_chan);
>>>
>> You may want to use IRQF_SHARED flag here and make slimpro_mbox_irq()
>> aware of that -- some platforms tie together irq lines of all
>> instances of a resource, like dma, mbox, so they may share the same
>> irq line.
> this is an internal dedicated irq line.
>
Yes on this platform/soc it is. But some future platform that uses the
same mbox controller might choose to tie all irqs together at the cost
of slightly increased latency. However I am OK if you are. So as you
wish for now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ