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>] [day] [month] [year] [list]
Date:   Mon, 18 May 2020 11:51:30 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc:     Serge Semin <fancer.lancer@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Georgy Vlasov <Georgy.Vlasov@...kalelectronics.ru>,
        Ramil Zaripov <Ramil.Zaripov@...kalelectronics.ru>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Paul Burton <paulburton@...nel.org>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Arnd Bergmann <arnd@...db.de>,
        Allison Randal <allison@...utok.net>,
        Gareth Williams <gareth.williams.jx@...esas.com>,
        Rob Herring <robh+dt@...nel.org>, linux-mips@...r.kernel.org,
        devicetree@...r.kernel.org,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "wuxu.wu" <wuxu.wu@...wei.com>, Clement Leger <cleger@...ray.eu>,
        linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 02/19] spi: dw: Add Tx/Rx finish wait methods to the
 MID DMA

On Fri, May 15, 2020 at 11:02:50PM +0300, Serge Semin wrote:
> On Fri, May 15, 2020 at 01:41:31PM +0100, Mark Brown wrote:

> > I guess we could, though it's really there because for historical
> > reasons we've got a bunch of different ways of specifying delays from
> > client drivers rather than for the executing a delay where you've
> > already got a good idea of the length of the delay.

> A beauty of spi_delay_exec() is that it provides a selective delay. I mean it
> checks the delay value and selects an appropriate delay method like ndelay,
> udelay and so on. That's the only reason I'd use it here. But It has got a few
> drawbacks:

Right, usually you'd have a good ideal how long the delay is and
therefore just be able to go directly for an appropraite delay function.

> - timeout value has type u16. It's too small to keep nanoseconds.

That could be increased, though obviously if you have a bigger delay you
can specify it in usecs instead.

> - semantically the xfer argument isn't optional and we can't fetch it that easy
>   in the dmaengine completion callbacks.

Not sure I follow this.

> So if there were an alternative method like _spi_transfer_delay_ns() I'd use it.
> Otherwise we'd need to locally implement the selective delay. Unless you know
> another alternative, which does it. If you don't and there isn't one then in
> order to not over-complicate a simple delay-loop code I'd simply leave the
> ndelay() here.

Not that I'm aware of.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ