History log of /linux-master/arch/xtensa/include/asm/string.h
Revision Date Author Comments
# e7cb0838 08-Jun-2023 Max Filippov <jcmvbkbc@gmail.com>

xtensa: drop bcopy implementation

bcopy is not exported and there's no in-tree users of this function.
Drop it.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 32bb954d 01-Jan-2018 Arnd Bergmann <arnd@arndb.de>

xtensa: shut up gcc-8 warnings

Many uses of strncpy() on xtensa causes a warning like

arch/xtensa/include/asm/string.h:56:42: warning: array subscript is above array bounds [-Warray-bounds]
: "0" (__dest), "1" (__src), "r" (__src+__n)

This avoids the warning by turning the pointer arithmetic into an
integer operation that does not get checked the same way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# c633544a 03-Dec-2017 Max Filippov <jcmvbkbc@gmail.com>

xtensa: add support for KASAN

Cover kernel addresses above 0x90000000 by the shadow map. Enable
HAVE_ARCH_KASAN when MMU is enabled. Provide kasan_early_init that fills
shadow map with writable copies of kasan_zero_page. Call
kasan_early_init right after mmu initialization in the setup_arch.
Provide kasan_init that allocates proper shadow map pages from the
memblock and puts these pages into the shadow map for addresses from
VMALLOC area to the end of KSEG. Call kasan_init right after memblock
initialization. Don't use KASAN for the boot code, MMU and KASAN
initialization and page fault handler. Make kernel stack size 4 times
larger when KASAN is enabled to avoid stack overflows.
GCC 7.3, 8 or newer is required to build the xtensa kernel with KASAN.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# c5a285bb 20-Jan-2013 Max Filippov <jcmvbkbc@gmail.com>

xtensa: fix str[n]cmp return value

str[n]cmp functions return negative value if the first string is less
than the second, positive value if the first string is greater than the
second and zero if they are equal. This is important when these
functions are used for sorting/binary search.

With incorrect strcmp return value bsearch was always failing in the
find_symbol_in_section making it impossible to load any module.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>


# a1b58c23 03-Feb-2012 Akinobu Mita <akinobu.mita@gmail.com>

xtensa: fix memscan()

Defining memscan() as memchr() is wrong, because the return values of
memscan() and memchr() are different when the character is not found. So
use the generic memscan() implementation to fix this.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 367b8112 06-Nov-2008 Chris Zankel <chris@zankel.net>

xtensa: move headers files to arch/xtensa/include

Move all header files for xtensa to arch/xtensa/include and platform and
variant header files to the appropriate arch/xtensa/platforms/ and
arch/xtensa/variants/ directories.

Moving the files gets also rid of all uses of symlinks in the Makefile.

This has been completed already for the majority of the architectures
and xtensa is one out of six missing.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Chris Zankel <chris@zankel.net>