diff options
author | Paul Brook <paul@codesourcery.com> | 2008-04-18 17:43:07 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2008-04-18 17:43:07 -0400 |
commit | 48d7927bdf071d05cf5d15b816cf06b0937cb84f (patch) | |
tree | 60f82f25897f9b3fd55148edac9348b451afc6cf /include/asm-arm/glue.h | |
parent | d7f864be8323e5394040e2877594645b0e7da85d (diff) |
Add a prefetch abort handler
This patch adds a prefetch abort handler similar to the data abort one
and renames the latter for consistency. Initial implementation by Paul
Brook with some renaming by Catalin Marinas.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include/asm-arm/glue.h')
-rw-r--r-- | include/asm-arm/glue.h | 87 |
1 files changed, 57 insertions, 30 deletions
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h index 22274ce8137..a97a182ba28 100644 --- a/include/asm-arm/glue.h +++ b/include/asm-arm/glue.h | |||
@@ -40,83 +40,110 @@ | |||
40 | * v6_early - ARMv6 generic early abort handler | 40 | * v6_early - ARMv6 generic early abort handler |
41 | * v7_early - ARMv7 generic early abort handler | 41 | * v7_early - ARMv7 generic early abort handler |
42 | */ | 42 | */ |
43 | #undef CPU_ABORT_HANDLER | 43 | #undef CPU_DABORT_HANDLER |
44 | #undef MULTI_ABORT | 44 | #undef MULTI_DABORT |
45 | 45 | ||
46 | #if defined(CONFIG_CPU_ARM610) | 46 | #if defined(CONFIG_CPU_ARM610) |
47 | # ifdef CPU_ABORT_HANDLER | 47 | # ifdef CPU_DABORT_HANDLER |
48 | # define MULTI_ABORT 1 | 48 | # define MULTI_DABORT 1 |
49 | # else | 49 | # else |
50 | # define CPU_ABORT_HANDLER cpu_arm6_data_abort | 50 | # define CPU_DABORT_HANDLER cpu_arm6_data_abort |
51 | # endif | 51 | # endif |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #if defined(CONFIG_CPU_ARM710) | 54 | #if defined(CONFIG_CPU_ARM710) |
55 | # ifdef CPU_ABORT_HANDLER | 55 | # ifdef CPU_DABORT_HANDLER |
56 | # define MULTI_ABORT 1 | 56 | # define MULTI_DABORT 1 |
57 | # else | 57 | # else |
58 | # define CPU_ABORT_HANDLER cpu_arm7_data_abort | 58 | # define CPU_DABORT_HANDLER cpu_arm7_data_abort |
59 | # endif | 59 | # endif |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #ifdef CONFIG_CPU_ABRT_LV4T | 62 | #ifdef CONFIG_CPU_ABRT_LV4T |
63 | # ifdef CPU_ABORT_HANDLER | 63 | # ifdef CPU_DABORT_HANDLER |
64 | # define MULTI_ABORT 1 | 64 | # define MULTI_DABORT 1 |
65 | # else | 65 | # else |
66 | # define CPU_ABORT_HANDLER v4t_late_abort | 66 | # define CPU_DABORT_HANDLER v4t_late_abort |
67 | # endif | 67 | # endif |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #ifdef CONFIG_CPU_ABRT_EV4 | 70 | #ifdef CONFIG_CPU_ABRT_EV4 |
71 | # ifdef CPU_ABORT_HANDLER | 71 | # ifdef CPU_DABORT_HANDLER |
72 | # define MULTI_ABORT 1 | 72 | # define MULTI_DABORT 1 |
73 | # else | 73 | # else |
74 | # define CPU_ABORT_HANDLER v4_early_abort | 74 | # define CPU_DABORT_HANDLER v4_early_abort |
75 | # endif | 75 | # endif |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #ifdef CONFIG_CPU_ABRT_EV4T | 78 | #ifdef CONFIG_CPU_ABRT_EV4T |
79 | # ifdef CPU_ABORT_HANDLER | 79 | # ifdef CPU_DABORT_HANDLER |
80 | # define MULTI_ABORT 1 | 80 | # define MULTI_DABORT 1 |
81 | # else | 81 | # else |
82 | # define CPU_ABORT_HANDLER v4t_early_abort | 82 | # define CPU_DABORT_HANDLER v4t_early_abort |
83 | # endif | 83 | # endif |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | #ifdef CONFIG_CPU_ABRT_EV5TJ | 86 | #ifdef CONFIG_CPU_ABRT_EV5TJ |
87 | # ifdef CPU_ABORT_HANDLER | 87 | # ifdef CPU_DABORT_HANDLER |
88 | # define MULTI_ABORT 1 | 88 | # define MULTI_DABORT 1 |
89 | # else | 89 | # else |
90 | # define CPU_ABORT_HANDLER v5tj_early_abort | 90 | # define CPU_DABORT_HANDLER v5tj_early_abort |
91 | # endif | 91 | # endif |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #ifdef CONFIG_CPU_ABRT_EV5T | 94 | #ifdef CONFIG_CPU_ABRT_EV5T |
95 | # ifdef CPU_ABORT_HANDLER | 95 | # ifdef CPU_DABORT_HANDLER |
96 | # define MULTI_ABORT 1 | 96 | # define MULTI_DABORT 1 |
97 | # else | 97 | # else |
98 | # define CPU_ABORT_HANDLER v5t_early_abort | 98 | # define CPU_DABORT_HANDLER v5t_early_abort |
99 | # endif | 99 | # endif |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_CPU_ABRT_EV6 | 102 | #ifdef CONFIG_CPU_ABRT_EV6 |
103 | # ifdef CPU_ABORT_HANDLER | 103 | # ifdef CPU_DABORT_HANDLER |
104 | # define MULTI_ABORT 1 | 104 | # define MULTI_DABORT 1 |
105 | # else | 105 | # else |
106 | # define CPU_ABORT_HANDLER v6_early_abort | 106 | # define CPU_DABORT_HANDLER v6_early_abort |
107 | # endif | 107 | # endif |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | #ifdef CONFIG_CPU_ABRT_EV7 | 110 | #ifdef CONFIG_CPU_ABRT_EV7 |
111 | # ifdef CPU_ABORT_HANDLER | 111 | # ifdef CPU_DABORT_HANDLER |
112 | # define MULTI_ABORT 1 | 112 | # define MULTI_DABORT 1 |
113 | # else | 113 | # else |
114 | # define CPU_ABORT_HANDLER v7_early_abort | 114 | # define CPU_DABORT_HANDLER v7_early_abort |
115 | # endif | 115 | # endif |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | #ifndef CPU_ABORT_HANDLER | 118 | #ifndef CPU_DABORT_HANDLER |
119 | #error Unknown data abort handler type | 119 | #error Unknown data abort handler type |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | /* | ||
123 | * Prefetch abort handler. If the CPU has an IFAR use that, otherwise | ||
124 | * use the address of the aborted instruction | ||
125 | */ | ||
126 | #undef CPU_PABORT_HANDLER | ||
127 | #undef MULTI_PABORT | ||
128 | |||
129 | #ifdef CONFIG_CPU_PABRT_IFAR | ||
130 | # ifdef CPU_PABORT_HANDLER | ||
131 | # define MULTI_PABORT 1 | ||
132 | # else | ||
133 | # define CPU_PABORT_HANDLER(reg, insn) mrc p15, 0, reg, cr6, cr0, 2 | ||
134 | # endif | ||
135 | #endif | ||
136 | |||
137 | #ifdef CONFIG_CPU_PABRT_NOIFAR | ||
138 | # ifdef CPU_PABORT_HANDLER | ||
139 | # define MULTI_PABORT 1 | ||
140 | # else | ||
141 | # define CPU_PABORT_HANDLER(reg, insn) mov reg, insn | ||
142 | # endif | ||
143 | #endif | ||
144 | |||
145 | #ifndef CPU_PABORT_HANDLER | ||
146 | #error Unknown prefetch abort handler type | ||
147 | #endif | ||
148 | |||
122 | #endif | 149 | #endif |