summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/lib
Commit message (Collapse)AuthorAgeFilesLines
* xtensa: don't use a12 in __xtensa_copy_user in call0 ABIMax Filippov2021-10-181-6/+22
| | | | | | | | | a12 is callee-saved register in xtensa call0 ABI, so a function must not change it. The main unaligned copy loop of __xtensa_copy_user uses all low-numbered registers, so a register must be spilled to avoid using a12 as a loop counter. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: don't use a12 in strncpy_userMax Filippov2021-10-181-9/+8
| | | | | | | | a12 is callee-saved register in xtensa call0 ABI, so a function must not change it. a10 is not used in this function at all, use it instead of a12 to avoid saving/restoring it. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: propagate the calling conventions change down into ↵Al Viro2020-08-201-52/+15
| | | | | | | | csum_partial_copy_generic() turn the exception handlers into returning 0. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: abstract 'entry' and 'retw' in assembly codeMax Filippov2019-07-086-51/+51
| | | | | | | | | | | Provide abi_entry, abi_entry_default, abi_ret and abi_ret_default macros that allocate aligned stack frame in windowed and call0 ABIs. Provide XTENSA_SPILL_STACK_RESERVE macro that specifies required stack frame size when register spilling is involved. Replace all uses of 'entry' and 'retw' with the above macros. This makes most of the xtensa assembly code ready for XEA3 and call0 ABI. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner2019-05-302-10/+2
| | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* xtensa: replace variant/core.h with asm/core.hMax Filippov2019-05-066-6/+6
| | | | | | | | Introduce the header arch/xtensa/include/asm/core.h that provides definitions for XCHAL macros missing in older xtensa releases. Use this header instead of variant/core.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: add support for KASANMax Filippov2017-12-162-6/+9
| | | | | | | | | | | | | | | | 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>
* xtensa: clean up custom-controlled debug outputMax Filippov2017-12-161-36/+9
| | | | | | | Replace #ifdef'fed/commented out debug printk statements with pr_debug. Replace printk statements with pr_* equivalents. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: clean up functions in assembly codeMax Filippov2017-12-105-36/+27
| | | | | | | Use ENTRY and ENDPROC throughout arch/xtensa/lib assembly sources. Introduce asm/linkage.h and define xtensa-specific __ALIGN macro there. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: clean up word alignment macros in assembly codeMax Filippov2017-12-102-48/+25
| | | | | | | Remove duplicate definitions of ALIGN/src_b/__src_b and SSA8/ssa8/__ssa8 from assembly sources and put single definition into asm/asmmacro.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: clean up fixups in assembly codeMax Filippov2017-12-105-166/+121
| | | | | | | Remove duplicate definitions of EX() and similar TRY/CATCH and SRC/DST macros from assembly sources and put single definition into asm/asmmacro.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: get rid of zeroing, use RAW_COPY_USERAl Viro2017-03-281-68/+48
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: fixes for configs without loop optionMax Filippov2015-11-021-3/+3
| | | | | | | | | | | | | | | | Build-time fixes: - make lbeg/lend/lcount save/restore conditional on kernel entry; - don't clear lcount in platform_restart functions unconditionally. Run-time fixes: - use correct end of range register in __endla paired with __loopt, not the unused temporary register. This fixes .bss zero-initialization. Update comments in asmmacro.h; - don't clobber a10 in the usercopy that leads to access to unmapped memory. Cc: <stable@vger.kernel.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: clean up files to make them code-style compliantChris Zankel2012-12-186-18/+13
| | | | | | | Remove heading and trailing spaces, trim trailing lines, and wrap lines that are longer than 80 characters. Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: provide proper assembler function boundaries with ENDPROC()Chris Zankel2012-12-181-1/+4
| | | | | | Use ENDPROC() to mark the end of assembler functions. Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: fix memmove(), bcopy(), and memcpy().Chris Zankel2012-10-151-25/+284
| | | | | | | | | - fix memmove to correctly handle overlapping src and dst; - fix memcpy loop ending conditions from signed '<=' to '!='; - modify bcopy to call memmove; Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: move headers files to arch/xtensa/includeChris Zankel2008-11-066-6/+6
| | | | | | | | | | | | | | 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>
* [XTENSA] fix sources using deprecated assembler directiveChris Zankel2007-05-312-32/+34
| | | | | | | The assembler directive '.begin literal' is deprecated in the newer versions of the binutils (strncopy_user.S and strnlen_user.S). Signed-off-by: Chris Zankel <chris@zankel.net>
* [STRING]: Move strcasecmp/strncasecmp to lib/string.cDavid S. Miller2007-04-262-33/+1
| | | | | | | We have several platforms using local copies of identical code. Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] xtensa: remove extra header filesChris Zankel2006-12-106-7/+6
| | | | | | | | | | | The Xtensa port contained many header files that were never needed. This rather lengthy patch removes all those files. Unfortunately, there were many dependencies that needed to be updated, so this patch touches quite a few source files. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* fix file specification in commentsUwe Zeisberger2006-10-031-1/+1
| | | | | | | Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Attack of "the the"s in archMatt LaPlante2006-10-031-2/+2
| | | | | | | | | The patch below corrects multiple occurances of "the the" typos across several files, both in source comments and KConfig files. There is no actual code changed, only text. Note this only affects the /arch directory, and I believe I could find many more elsewhere. :) Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] xtensa: Architecture support for Tensilica Xtensa Part 4Chris Zankel2005-06-249-0/+1968
The attached patches provides part 4 of an architecture implementation for the Tensilica Xtensa CPU series. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>