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: <CAJe_ZhfwhMBVhsOm4K69crX38rgrwYenQfySox7nGNVqQHreNQ@mail.gmail.com>
Date:	Wed, 16 Jul 2014 18:35:33 +0530
From:	Jassi Brar <jaswinder.singh@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Sudeep Holla <sudeep.holla@....com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ks.giri@...sung.com" <ks.giri@...sung.com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Mark Rutland <Mark.Rutland@....com>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	Pawel Moll <Pawel.Moll@....com>,
	"courtney.cavin@...ymobile.com" <courtney.cavin@...ymobile.com>,
	"mporter@...aro.org" <mporter@...aro.org>,
	"slapdau@...oo.com.au" <slapdau@...oo.com.au>,
	"lftan.linux@...il.com" <lftan.linux@...il.com>,
	"loic.pallardy@...com" <loic.pallardy@...com>,
	"s-anna@...com" <s-anna@...com>,
	"ashwin.chaugule@...aro.org" <ashwin.chaugule@...aro.org>,
	"bjorn@...o.se" <bjorn@...o.se>,
	"patches@...aro.org" <patches@...aro.org>,
	"Mollie.Wu@...fujitsu.com" <Mollie.Wu@...fujitsu.com>,
	"t.takinishi@...fujitsu.com" <t.takinishi@...fujitsu.com>
Subject: Re: [PATCHv8 2/2] mailbox: Introduce framework for mailbox

On 16 July 2014 18:15, Arnd Bergmann <arnd@...db.de> wrote:
> On Wednesday 16 July 2014 18:07:04 Jassi Brar wrote:
>> On 16 July 2014 15:46, Arnd Bergmann <arnd@...db.de> wrote:
>> > On Wednesday 16 July 2014 10:40:19 Sudeep Holla wrote:
>> >> > +
>> >> > +Required property:
>> >> > +- mbox: List of phandle and mailbox channel specifier.
>> >> > +
>> >> > +- mbox-names: List of identifier strings for each mailbox channel
>> >> > +               required by the client.
>> >> > +
>> >>
>> >> IMO the mailbox names are more associated with the controller channels/
>> >> mailbox rather than the clients using it. Does it make sense to move
>> >> this under controller. It also avoid each client replicating the names.
>> >
>> > I think it would be best to just make the mbox-names property optional,
>> > like we have for other subsystems.
>> >
>> A very similar subsystem - DMAEngine also has 'dma-names' as a
>> required property.
>>
>> If a client is assigned only 1 mbox in DT, we can do without
>> mbox-names. But I am not sure what to do if a client needs two or more
>> differently capable mboxes? Simply allocating in order of mbox request
>> doesn't seem very robust.
>
> Traditionally, these things (regs, interrupts, ...) are just accessed
> by index. The reason why dmaengine requires the name is that some machines
> can use multiple DMA engine devices attached to the same request line,
> so the dmaengine subsystem can pick any of them that has a matching
> name.
And also, I think, when a client needs 2 different dma channels, say
for RX and TX each. The api can't assign the first channel specified
in 'dmas' property to the first channel request that comes to it,
unless we assume client driver always requests dma channels in the
order written in its DT node.  And this is the main reason I see for
having mbox-names property.
  If we make mbox-names optional, do we assume client driver must
request mbox in the order specified in its DT node?

> If you specify multiple channels with the same name, you can no
> longer use the index to refer to multiple alternatives.
>
Identical entries in dma-names/mbox-names property means the channels
are equally capable and can be assigned in the 'first free found'
manner.

Thanks
Jassi
--
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