]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 9115/1: mm/maccess: fix unaligned copy_{from,to}_kernel_nofault
authorArnd Bergmann <arnd@arndb.de>
Wed, 11 Aug 2021 07:30:18 +0000 (08:30 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 20 Aug 2021 10:39:25 +0000 (11:39 +0100)
commit2afc46706bc232a3b261fdad8550c28f3a90f4f8
tree06f5aa0dc1bb84599a5ed11a505c901a1ca3ad39
parent677513e8c90e734b134a55cf845f970612a646af
ARM: 9115/1: mm/maccess: fix unaligned copy_{from,to}_kernel_nofault

On machines such as ARMv5 that trap unaligned accesses, these
two functions can be slow when each access needs to be emulated,
or they might not work at all.

Change them so that each loop is only used when both the src
and dst pointers are naturally aligned.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
mm/maccess.c