tile: add <asm/word-at-a-time.h> and enable support functions
authorChris Metcalf <cmetcalf@ezchip.com>
Thu, 30 Apr 2015 19:12:42 +0000 (15:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 16:30:12 +0000 (09:30 -0700)
commita3dabe4605826e66ed607ee718cc7d8081caee41
treeacbd7aba11679564f9eb2c52cd65e2748b30be60
parenta553ec72f334520ec7307c19dfb8869773470a23
tile: add <asm/word-at-a-time.h> and enable support functions

commit 5bf6c07a1843813d0065feaaecba622d49148d7e upstream.

This change enables the generic strncpy_from_user() and strnlen_user()
using word-at-a-time.h.  The tile implementation is trivial since
both tilepro and tilegx have SIMD operations that do byte-wise
comparisons against immediate zero for each byte, and return an
0x01 byte in each position where there is a 0x00 byte.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/tile/Kconfig
arch/tile/include/asm/uaccess.h
arch/tile/include/asm/word-at-a-time.h [new file with mode: 0644]
arch/tile/lib/exports.c
arch/tile/lib/usercopy_32.S
arch/tile/lib/usercopy_64.S