Commit cd613aaa2d48ac39812da203d386d5cf8b8dbd97
Committed by
Tero Kristo
1 parent
6d749b28cf
Exists in
ti-lsk-linux-4.1.y
and in
5 other branches
ARM: 8422/1: enable imprecise aborts during early kernel startup
commit bbeb9209515989ff47802d4e5d5702178c8e42c4 upstream. This patch adds imprecise abort enable/disable macros and uses them to enable imprecise aborts early when starting the kernel. This helps in tracking down the real cause for such imprecise abort, as they are handled as soon as they occur. Until now those aborts would only be enabled when entering the userspace and as a consequence crash the first userspace process if any abort had been raised during kernel startup. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Nishanth Menon <nm@ti.com>
Showing 3 changed files with 14 additions and 0 deletions Side-by-side Diff
arch/arm/include/asm/irqflags.h
... | ... | @@ -51,7 +51,15 @@ |
51 | 51 | |
52 | 52 | #define local_fiq_enable() __asm__("cpsie f @ __stf" : : : "memory", "cc") |
53 | 53 | #define local_fiq_disable() __asm__("cpsid f @ __clf" : : : "memory", "cc") |
54 | + | |
55 | +#ifndef CONFIG_CPU_V7M | |
56 | +#define local_abt_enable() __asm__("cpsie a @ __sta" : : : "memory", "cc") | |
57 | +#define local_abt_disable() __asm__("cpsid a @ __cla" : : : "memory", "cc") | |
54 | 58 | #else |
59 | +#define local_abt_enable() do { } while (0) | |
60 | +#define local_abt_disable() do { } while (0) | |
61 | +#endif | |
62 | +#else | |
55 | 63 | |
56 | 64 | /* |
57 | 65 | * Save the current interrupt enable state & disable IRQs |
... | ... | @@ -130,6 +138,8 @@ |
130 | 138 | : "memory", "cc"); \ |
131 | 139 | }) |
132 | 140 | |
141 | +#define local_abt_enable() do { } while (0) | |
142 | +#define local_abt_disable() do { } while (0) | |
133 | 143 | #endif |
134 | 144 | |
135 | 145 | /* |
arch/arm/kernel/smp.c