]> git.baikalelectronics.ru Git - kernel.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)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 5 May 2016 11:05:28 +0000 (16:35 +0530)
commit0d3e36c99859e381b5ae9d8d92553731bb9b2581
tree03e3e24bd50b01e178bb10e9aad22fee0b7f5704
parent1ce19509d4d14c5de0f0f3588cb214be06212032
ARC: Add missing io barriers to io{read,write}{16,32}be()

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>
Cc: stable@vger.kernel.org [4.2+]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/io.h