]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARC: Add missing io barriers to io{read,write}{16,32}be()
authorVineet Gupta <vgupta@synopsys.com>
Thu, 5 May 2016 08:02:34 +0000 (13:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 May 2016 09:21:20 +0000 (11:21 +0200)
commitf0f21f80609c7e1da91e34face5b86547bd7401a
tree3615a0e687ee276978114ce6698e602a7e57fb90
parent303fa967e0a3cf1f9116ceb009d10e196f899142
ARC: Add missing io barriers to io{read,write}{16,32}be()

commit e5bc0478ab6cf565619224536d75ecb2aedca43b upstream.

While reviewing a different change to asm-generic/io.h Arnd spotted that
ARC ioread32 and ioread32be both of which come from asm-generic versions
are not symmetrical in terms of calling the io barriers.

generic ioread32   -> ARC readl()                  [ has barriers]
generic ioread32be -> __be32_to_cpu(__raw_readl()) [ lacks barriers]

While generic ioread32be is being remediated to call readl(), that involves
a swab32(), causing double swaps on ioread32be() on Big Endian systems.

So provide our versions of big endian IO accessors to ensure io barrier
calls while also keeping them optimal

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/io.h