summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/entry-v7m.S
diff options
context:
space:
mode:
authorMaxime Coquelin stm32 <mcoquelin.stm32@gmail.com>2015-04-10 09:46:46 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-05-08 10:42:21 +0100
commit6b1814cde5c79c6aa4d02c9aedc14a709c2c0737 (patch)
tree1510cad5eb6bacd362b90a9c3124dfb9f4973a36 /arch/arm/kernel/entry-v7m.S
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
ARM: 8340/1: ARMv7-M: Enlarge vector table up to 256 entries
From Cortex-M reference manuals, the nvic supports up to 240 interrupts. So the number of entries in vectors table is up to 256. This patch adds a new config flag to specify the number of external interrupts. Some ifdeferies are added in order to respect the natural alignment without wasting too much space on smaller systems. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Stefan Agner <stefan@agner.ch> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-v7m.S')
-rw-r--r--arch/arm/kernel/entry-v7m.S13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 8944f4991c3c..b6c8bb9315e7 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -117,9 +117,14 @@ ENTRY(__switch_to)
ENDPROC(__switch_to)
.data
- .align 8
+#if CONFIG_CPU_V7M_NUM_IRQ <= 112
+ .align 9
+#else
+ .align 10
+#endif
+
/*
- * Vector table (64 words => 256 bytes natural alignment)
+ * Vector table (Natural alignment need to be ensured)
*/
ENTRY(vector_table)
.long 0 @ 0 - Reset stack pointer
@@ -138,6 +143,6 @@ ENTRY(vector_table)
.long __invalid_entry @ 13 - Reserved
.long __pendsv_entry @ 14 - PendSV
.long __invalid_entry @ 15 - SysTick
- .rept 64 - 16
- .long __irq_entry @ 16..64 - External Interrupts
+ .rept CONFIG_CPU_V7M_NUM_IRQ
+ .long __irq_entry @ External Interrupts
.endr