summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/setup.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2020-01-31 18:48:43 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2020-02-04 21:53:39 -0800
commit50722f0bf631cfcbcce18dac6b3fb5c2b6432628 (patch)
tree23ec7b5989f9cf6f1c987daeafd1ee60d148dbb6 /arch/xtensa/kernel/setup.c
parent58bc6c69afe51ed19d1294ab0bb319b7df1cf75a (diff)
downloadlinux-50722f0bf631cfcbcce18dac6b3fb5c2b6432628.tar.gz
linux-50722f0bf631cfcbcce18dac6b3fb5c2b6432628.tar.bz2
linux-50722f0bf631cfcbcce18dac6b3fb5c2b6432628.zip
xtensa: move fast exception handlers close to vectors
On XIP kernels it makes sense to have exception vectors and fast exception handlers together (in a fast memory). In addition, with MTD XIP support both vectors and fast exception handlers must be outside of the FLASH. Add section .exception.text and move fast exception handlers to it. Put it together with vectors when vectors are outside of the .text. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/setup.c')
-rw-r--r--arch/xtensa/kernel/setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 0f93b67c7a5a..fefbdce1db99 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -284,6 +284,8 @@ extern char _UserExceptionVector_text_start;
extern char _UserExceptionVector_text_end;
extern char _DoubleExceptionVector_text_start;
extern char _DoubleExceptionVector_text_end;
+extern char _exception_text_start;
+extern char _exception_text_end;
#if XCHAL_EXCM_LEVEL >= 2
extern char _Level2InterruptVector_text_start;
extern char _Level2InterruptVector_text_end;
@@ -363,6 +365,8 @@ void __init setup_arch(char **cmdline_p)
mem_reserve(__pa(&_DoubleExceptionVector_text_start),
__pa(&_DoubleExceptionVector_text_end));
+ mem_reserve(__pa(&_exception_text_start),
+ __pa(&_exception_text_end));
#if XCHAL_EXCM_LEVEL >= 2
mem_reserve(__pa(&_Level2InterruptVector_text_start),
__pa(&_Level2InterruptVector_text_end));