diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2020-01-31 18:48:43 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-02-04 21:53:39 -0800 |
commit | 50722f0bf631cfcbcce18dac6b3fb5c2b6432628 (patch) | |
tree | 23ec7b5989f9cf6f1c987daeafd1ee60d148dbb6 /arch/xtensa/kernel/vmlinux.lds.S | |
parent | 58bc6c69afe51ed19d1294ab0bb319b7df1cf75a (diff) |
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/vmlinux.lds.S')
-rw-r--r-- | arch/xtensa/kernel/vmlinux.lds.S | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 409c05cac15e..37a3205c404c 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -110,6 +110,8 @@ SECTIONS SECTION_VECTOR (.KernelExceptionVector.text, KERNEL_VECTOR_VADDR) SECTION_VECTOR (.UserExceptionVector.text, USER_VECTOR_VADDR) SECTION_VECTOR (.DoubleExceptionVector.text, DOUBLEEXC_VECTOR_VADDR) + + *(.exception.text) #endif IRQENTRY_TEXT @@ -190,6 +192,8 @@ SECTIONS .DoubleExceptionVector.text); RELOCATE_ENTRY(_DebugInterruptVector_text, .DebugInterruptVector.text); + RELOCATE_ENTRY(_exception_text, + .exception.text); #endif #ifdef CONFIG_XIP_KERNEL RELOCATE_ENTRY(_xip_data, .data); @@ -282,8 +286,7 @@ SECTIONS .DoubleExceptionVector.text, DOUBLEEXC_VECTOR_VADDR, .UserExceptionVector.text) - - . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; +#define LAST .DoubleExceptionVector.text #endif #if !defined(CONFIG_XIP_KERNEL) && defined(CONFIG_SMP) @@ -292,10 +295,20 @@ SECTIONS .SecondaryResetVector.text, RESET_VECTOR1_VADDR, .DoubleExceptionVector.text) +#undef LAST +#define LAST .SecondaryResetVector.text - . = LOADADDR(.SecondaryResetVector.text)+SIZEOF(.SecondaryResetVector.text); +#endif +#ifdef CONFIG_VECTORS_OFFSET + SECTION_VECTOR (_exception_text, + .exception.text, + , + LAST) +#undef LAST +#define LAST .exception.text #endif + . = (LOADADDR(LAST) + SIZEOF(LAST) + 3) & ~ 3; . = ALIGN(PAGE_SIZE); |