MIPS: Drop 32-bit asm string functions
authorPaul Burton <paul.burton@mips.com>
Tue, 8 Oct 2019 19:46:01 +0000 (19:46 +0000)
committerPaul Burton <paul.burton@mips.com>
Wed, 9 Oct 2019 19:48:05 +0000 (12:48 -0700)
commit3c0be5849259b729580c23549330973a2dd513a2
tree27ce480015e39e2469b4fe479a1b62976ad83be5
parent6baaeadae911ba9cedfead881f3bf305a18fd011
MIPS: Drop 32-bit asm string functions

We have assembly implementations of strcpy(), strncpy(), strcmp() &
strncmp() which:

 - Are simple byte-at-a-time loops with no particular optimizations. As
   a comment in the code describes, they're "rather naive".

 - Offer no clear performance advantage over the generic C
   implementations - in microbenchmarks performed by Alexander Lobakin
   the asm functions sometimes win & sometimes lose, but generally not
   by large margins in either direction.

 - Don't support 64-bit kernels, where we already make use of the
   generic C implementations.

 - Tend to bloat kernel code size due to inlining.

 - Don't support CONFIG_FORTIFY_SOURCE.

 - Won't support nanoMIPS without rework.

For all of these reasons, delete the asm implementations & make use of
the generic C implementations for 32-bit kernels just like we already do
for 64-bit kernels.

Signed-off-by: Paul Burton <paul.burton@mips.com>
URL: https://lore.kernel.org/linux-mips/a2a35f1cf58d6db19eb4af9b4ae21e35@dlink.ru/
Cc: Alexander Lobakin <alobakin@dlink.ru>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: linux-mips@vger.kernel.org
arch/mips/include/asm/string.h