Re: [PATCH net-next] net: ethernet: ti: davinci_mdio: switch to readl/writel_relaxed()

From: Grygorii Strashko
Date: Fri Mar 29 2019 - 05:14:02 EST


Hi Arnd,

On 29.03.19 03:00, Arnd Bergmann wrote:
> On Fri, Mar 29, 2019 at 1:10 AM Grygorii Strashko
> <grygorii.strashko@xxxxxx> 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@xxxxxx>
>
> 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.
>

it's not fast path, so readl/writel should be ok. I'll resend.

--
Best regards,
grygorii