diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-03 21:12:27 -0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-21 05:28:55 -0400 |
commit | 53490121e9ffa3e6314137af016cde8ac83c9bb4 (patch) | |
tree | a255f95a198f91c3a4edd24e5858a7a753586200 | |
parent | a4f9846da76c854dcd13a5ac00826b599ad09745 (diff) |
xtensa: move vecbase SR initialization to _startup
Instead of initializing vecbase in initialize_mmu macro, which may be
expanded either in Image.elf reset vector hadler or in the kernel
head.S, both times only when CONFIG_MMU is enabled, do this
initialization once in _startup function.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r-- | arch/xtensa/include/asm/initialize_mmu.h | 3 | ||||
-rw-r--r-- | arch/xtensa/kernel/head.S | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/xtensa/include/asm/initialize_mmu.h b/arch/xtensa/include/asm/initialize_mmu.h index 600781edc8a3..cdac5584ec0c 100644 --- a/arch/xtensa/include/asm/initialize_mmu.h +++ b/arch/xtensa/include/asm/initialize_mmu.h | |||
@@ -141,9 +141,6 @@ | |||
141 | jx a4 | 141 | jx a4 |
142 | 142 | ||
143 | 1: | 143 | 1: |
144 | movi a2, VECBASE_RESET_VADDR | ||
145 | wsr a2, vecbase | ||
146 | |||
147 | /* Step 5: remove temporary mapping. */ | 144 | /* Step 5: remove temporary mapping. */ |
148 | idtlb a7 | 145 | idtlb a7 |
149 | iitlb a7 | 146 | iitlb a7 |
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index aeeb3cc8a410..15a461e2a0ed 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -112,6 +112,11 @@ ENTRY(_startup) | |||
112 | 112 | ||
113 | movi a0, 0 | 113 | movi a0, 0 |
114 | 114 | ||
115 | #if XCHAL_HAVE_VECBASE | ||
116 | movi a2, VECBASE_RESET_VADDR | ||
117 | wsr a2, vecbase | ||
118 | #endif | ||
119 | |||
115 | /* Clear debugging registers. */ | 120 | /* Clear debugging registers. */ |
116 | 121 | ||
117 | #if XCHAL_HAVE_DEBUG | 122 | #if XCHAL_HAVE_DEBUG |