sh: remove unaligned access for sh4a
authorArnd Bergmann <arnd@arndb.de>
Fri, 7 May 2021 22:07:48 +0000 (00:07 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 10 May 2021 15:50:47 +0000 (17:50 +0200)
commit94528b70781a4c63db9e1309d4cdbcaef2387904
tree4a3660f6628bc88b3d1bcd6cc05202c782d8d24a
parentbf067edf5d2f5b2948ee7197974a719aae3e526c
sh: remove unaligned access for sh4a

Unlike every other architecture, sh4a uses an inline asm implementation
for get_unaligned(). I have shown that this produces better object
code than the asm-generic version. However, there are very few users of
arch/sh/ overall, and most of those seem to use sh4 rather than sh4a CPU
cores, so it seems not worth keeping the complexity in the architecture
independent code.

Change over to the generic version to allow simplifying that in a
follow-up patch.

If there are sh4a users that want the best performance, it would probably
be best to add support for the movua instruction in gcc itself, as this
would not just help get_unaligned() callers but any code that accesses
a __packed variable in user space or kernel.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/sh/include/asm/unaligned-sh4a.h [deleted file]
arch/sh/include/asm/unaligned.h [deleted file]