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: <CAK8P3a2MP-YNkHLG9LgrQ_zeRWiJkwwNXJmptunF8+_uZTcYFg@mail.gmail.com>
Date:   Fri, 29 Mar 2019 09:00:50 +0800
From:   Arnd Bergmann <arnd@...db.de>
To:     Grygorii Strashko <grygorii.strashko@...com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>,
        Sekhar Nori <nsekhar@...com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-omap <linux-omap@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH net-next] net: ethernet: ti: davinci_mdio: switch to readl/writel_relaxed()

On Fri, Mar 29, 2019 at 1:10 AM Grygorii Strashko
<grygorii.strashko@...com> wrote:
>
> Switch to readl/writel_relaxed() APIs, because this is recommended
> API and the MDIO block is reused on Keystone 2 SoCs
> where LE/BE modes are supported.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>

In general, my recommendation would be to use readl/writel instead of
readl_relaxed/writel_relaxed everywhere, because they have much
more predictible behavior. If you want to use the _relaxed version
in the fast-path for data traffic, that is usually fine, but then I would
add a comment next to it to explain why it is safe there without extra
barriers to serialize with spinlocks and DMA.

Changing away from __raw_*() to enable big-endian mode is of
course a good idea as well.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ