arm64: use generic strnlen_user and strncpy_from_user functions
authorWill Deacon <will.deacon@arm.com>
Wed, 6 Nov 2013 17:20:22 +0000 (17:20 +0000)
committerMark Brown <broonie@linaro.org>
Fri, 16 May 2014 15:39:06 +0000 (16:39 +0100)
commit18ce3c2a82fb1a7461b8d63cd54a40a47067be47
treebcbf8fa1d4bf63d1e90aeaff290e81854d228618
parentedf0cf19ba3b6c750871b391c5edcb679c02daad
arm64: use generic strnlen_user and strncpy_from_user functions

This patch implements the word-at-a-time interface for arm64 using the
same algorithm as ARM. We use the fls64 macro, which expands to a clz
instruction via a compiler builtin. Big-endian configurations make use
of the implementation from asm-generic.

With this implemented, we can replace our byte-at-a-time strnlen_user
and strncpy_from_user functions with the optimised generic versions.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 12a0ef7b0ac38677bd2d85f33df5ca0a57868819)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/Kconfig
arch/arm64/include/asm/uaccess.h
arch/arm64/include/asm/word-at-a-time.h [new file with mode: 0644]
arch/arm64/kernel/arm64ksyms.c
arch/arm64/lib/Makefile
arch/arm64/lib/strncpy_from_user.S [deleted file]
arch/arm64/lib/strnlen_user.S [deleted file]