xtensa: allow merging vectors into .text section

Currently code for exception/IRQ vectors is stored in kernel image as
initialization data and is copied to its working addresses during
startup. It doesn't always make sense. In many cases vectors location
can be automatically decided at kernel link time and code can be placed
right there. This is especially useful for XIP kernel.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov
2017-01-04 10:40:49 -08:00
parent 9a736fcb09
commit b46dcfa378
3 changed files with 48 additions and 0 deletions
+4
View File
@@ -67,7 +67,11 @@ static inline unsigned long xtensa_get_kio_paddr(void)
#endif /* CONFIG_MMU */
#define RESET_VECTOR1_VADDR (XCHAL_RESET_VECTOR1_VADDR)
#ifdef CONFIG_VECTORS_OFFSET
#define VECBASE_VADDR (KERNELOFFSET - CONFIG_VECTORS_OFFSET)
#else
#define VECBASE_VADDR _vecbase
#endif
#if defined(XCHAL_HAVE_VECBASE) && XCHAL_HAVE_VECBASE