[ARM] Add support for pause_on_oops and display preempt/smp options

Add calls to oops_enter() and oops_exit() to __die(), so that
things like lockdep know when an oops occurs.

Add suffixes to the oops report to indicate whether the running
kernel has been built with preempt or smp support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Russell King and committed by Russell King d9202429 188e1f81

+19 -1
+19 -1
arch/arm/kernel/traps.c
··· 204 204 barrier(); 205 205 } 206 206 207 + #ifdef CONFIG_PREEMPT 208 + #define S_PREEMPT " PREEMPT" 209 + #else 210 + #define S_PREEMPT "" 211 + #endif 212 + #ifdef CONFIG_SMP 213 + #define S_SMP " SMP" 214 + #else 215 + #define S_SMP "" 216 + #endif 217 + 207 218 static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 208 219 { 209 220 struct task_struct *tsk = thread->task; 210 221 static int die_counter; 211 222 212 - printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); 223 + printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", 224 + str, err, ++die_counter); 213 225 print_modules(); 214 226 __show_regs(regs); 215 227 printk("Process %s (pid: %d, stack limit = 0x%p)\n", ··· 244 232 { 245 233 struct thread_info *thread = current_thread_info(); 246 234 235 + oops_enter(); 236 + 247 237 console_verbose(); 248 238 spin_lock_irq(&die_lock); 249 239 bust_spinlocks(1); ··· 253 239 bust_spinlocks(0); 254 240 spin_unlock_irq(&die_lock); 255 241 242 + if (in_interrupt()) 243 + panic("Fatal exception in interrupt"); 244 + 256 245 if (panic_on_oops) 257 246 panic("Fatal exception"); 258 247 248 + oops_exit(); 259 249 do_exit(SIGSEGV); 260 250 } 261 251