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: <CABb+yY2uLgrJ9-NUnoXYXCqQ7_sQyWxF=wRQFM+cja0HbBox4A@mail.gmail.com>
Date:   Thu, 26 Jul 2018 17:34:35 +0530
From:   Jassi Brar <jassisinghbrar@...il.com>
To:     "A.s. Dong" <aisheng.dong@....com>
Cc:     Oleksij Rempel <o.rempel@...gutronix.de>,
        Shawn Guo <shawnguo@...nel.org>,
        Fabio Estevam <fabio.estevam@....com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>,
        Sudeep Holla <sudeep.holla@....com>,
        Devicetree List <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ", Sascha Hauer" <kernel@...gutronix.de>,
        ", linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, srv_heupstream" 
        <linux-arm-kernel@...ts.infradead.org>,
        dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to be equal
 to 0

On Thu, Jul 26, 2018 at 5:25 PM, A.s. Dong <aisheng.dong@....com> wrote:
>> -----Original Message-----
>> From: Jassi Brar [mailto:jassisinghbrar@...il.com]
>> Sent: Thursday, July 26, 2018 7:37 PM
>> To: A.s. Dong <aisheng.dong@....com>
>> Cc: Oleksij Rempel <o.rempel@...gutronix.de>; Shawn Guo
>> <shawnguo@...nel.org>; Fabio Estevam <fabio.estevam@....com>; Rob
>> Herring <robh+dt@...nel.org>; Mark Rutland <mark.rutland@....com>;
>> Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>; Sudeep Holla
>> <sudeep.holla@....com>; Devicetree List <devicetree@...r.kernel.org>;
>> Linux Kernel Mailing List <linux-kernel@...r.kernel.org>; , Sascha Hauer
>> <kernel@...gutronix.de>; , linux-arm-kernel@...ts.infradead.org, linux-
>> mediatek@...ts.infradead.org, srv_heupstream <linux-arm-
>> kernel@...ts.infradead.org>; dl-linux-imx <linux-imx@....com>
>> Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to be
>> equal to 0
>>
>> On Thu, Jul 26, 2018 at 4:30 PM, A.s. Dong <aisheng.dong@....com> wrote:
>> >> -----Original Message-----
>> >> From: Jassi Brar [mailto:jassisinghbrar@...il.com]
>> >> Sent: Thursday, July 26, 2018 5:42 PM
>> >> To: Oleksij Rempel <o.rempel@...gutronix.de>
>> >> Cc: Shawn Guo <shawnguo@...nel.org>; Fabio Estevam
>> >> <fabio.estevam@....com>; Rob Herring <robh+dt@...nel.org>; Mark
>> >> Rutland <mark.rutland@....com>; A.s. Dong <aisheng.dong@....com>;
>> >> Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>; Sudeep Holla
>> >> <sudeep.holla@....com>; Devicetree List <devicetree@...r.kernel.org>;
>> >> Linux Kernel Mailing List <linux-kernel@...r.kernel.org>; , Sascha
>> >> Hauer <kernel@...gutronix.de>; ,
>> >> linux-arm-kernel@...ts.infradead.org, linux-
>> >> mediatek@...ts.infradead.org, srv_heupstream <linux-arm-
>> >> kernel@...ts.infradead.org>; dl-linux-imx <linux-imx@....com>
>> >> Subject: Re: [PATCH v7 1/6] dt-bindings: mailbox: allow mbox-cells to
>> >> be equal to 0
>> >>
>> >> On Thu, Jul 26, 2018 at 12:23 PM, Oleksij Rempel
>> >> <o.rempel@...gutronix.de>
>> >> wrote:
>> >> > From: Dong Aisheng <aisheng.dong@....com>
>> >> >
>> >> > Mailbox devices may have only one channel which means the
>> >> > mbox-cells at least 1 does not make sense for this type devices.
>> >> > Let's remove that limitation to allow the mbox-cells to be equal to 0.
>> >> >
>> >> OK
>> >>
>> >> But please realise that you'll have to write more code -- implement
>> >> your own
>> >> of_xlate() callback.
>> >> Most developers would prefer to call the only channel as channel
>> >> number 0, and use the common of_xlate implementation.
>> >>
>> >
>> > Yes, that's true because the common of_xlate assuming the mbox-cells is 1.
>> > And there's already such users:
>> > arch/arm/boot/dts/bcm283x.dtsi
>> >
>> You mean that is a good thing, right?
>
> No, I mean there's similar HW in kernel already that only has one channel.
> Are you suggesting even for one channel mailbox, we should still use
> Mbox-cells 1 and use 'mboxes = <&mailbox 0>' in devicetree?
>
As i said, I am ok with the mbox-cells to be 0.

But if you have two instances of the controller, one with 4 channels
and the other with 1 channel. Then you can/should not have different
bindings.

And, if the controller can have only 1 channel, then please feel free
to have mbox-cells=0 and implement your own of_xlate().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ