1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
Date: Mon, 30 Sep 2013 11:25:15 +0200
Subject: [PATCH] [RFC] ARM: prepare ARMv7-M for MULTIPLATFORM use
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
v7-M is a third group that is incompatible with both v4/v5 and v6/v7.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
This behaves strange but I think is robust not to allow broken configs:
When v4/v5 is selected, v6/v7 and v7m are available for enabling, too.
When v6/v7 is selected the other choices are disabled
When v7m is selected only v6/v7 are available for enabling.
---
arch/arm/Kconfig | 11 ++++++++---
arch/arm/kernel/entry-v7m.S | 4 ++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 314e396..cc24241 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -914,7 +914,7 @@ comment "CPU Core family selection"
config ARCH_MULTI_V4T
bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
- depends on !ARCH_MULTI_V6_V7
+ depends on !ARCH_MULTI_V6_V7 && !ARCH_MULTI_V7M
select ARCH_MULTI_V4_V5
select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \
@@ -922,7 +922,7 @@ config ARCH_MULTI_V4T
config ARCH_MULTI_V5
bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
- depends on !ARCH_MULTI_V6_V7
+ depends on !ARCH_MULTI_V6_V7 && !ARCH_MULTI_V7M
select ARCH_MULTI_V4_V5
select CPU_ARM926T if (!CPU_ARM946E || CPU_ARM1020 || \
CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
@@ -945,8 +945,13 @@ config ARCH_MULTI_V7
config ARCH_MULTI_V6_V7
bool
+config ARCH_MULTI_V7M
+ bool "ARMv7-M based platforms (Cortex-M)"
+ depends on !ARCH_MULTI_V6_V7 && !MMU
+ select CPU_V7M
+
config ARCH_MULTI_CPU_AUTO
- def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
+ def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7 || ARCH_MULTI_V7M)
select ARCH_MULTI_V5
endmenu
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 2260f18..f72ced6 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -139,3 +139,7 @@ ENTRY(vector_table)
.rept 64 - 16
.long __irq_entry @ 16..64 - External Interrupts
.endr
+
+ .globl handle_arch_irq
+handle_arch_irq:
+ .long 0
|