Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4449/1: more entries in arch/arm/boot/.gitignore
[ARM] 4452/1: Force the literal pool dump before reloc_end
[ARM] Update show_regs/oops register format
[ARM] Add support for pause_on_oops and display preempt/smp options

+58 -32
+3
arch/arm/boot/.gitignore
··· 1 Image 2 zImage
··· 1 Image 2 zImage 3 + xipImage 4 + bootpImage 5 + uImage
+1
arch/arm/boot/compressed/head.S
··· 836 mov pc, r10 837 #endif 838 839 reloc_end: 840 841 .align
··· 836 mov pc, r10 837 #endif 838 839 + .ltorg 840 reloc_end: 841 842 .align
+35 -28
arch/arm/kernel/process.c
··· 28 #include <linux/elfcore.h> 29 #include <linux/pm.h> 30 #include <linux/tick.h> 31 32 #include <asm/leds.h> 33 #include <asm/processor.h> ··· 200 201 void __show_regs(struct pt_regs *regs) 202 { 203 - unsigned long flags = condition_codes(regs); 204 205 - printk("CPU: %d\n", smp_processor_id()); 206 print_symbol("PC is at %s\n", instruction_pointer(regs)); 207 print_symbol("LR is at %s\n", regs->ARM_lr); 208 - printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" 209 "sp : %08lx ip : %08lx fp : %08lx\n", 210 - instruction_pointer(regs), 211 - regs->ARM_lr, print_tainted(), regs->ARM_sp, 212 - regs->ARM_ip, regs->ARM_fp); 213 printk("r10: %08lx r9 : %08lx r8 : %08lx\n", 214 regs->ARM_r10, regs->ARM_r9, 215 regs->ARM_r8); ··· 222 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", 223 regs->ARM_r3, regs->ARM_r2, 224 regs->ARM_r1, regs->ARM_r0); 225 - printk("Flags: %c%c%c%c", 226 - flags & PSR_N_BIT ? 'N' : 'n', 227 - flags & PSR_Z_BIT ? 'Z' : 'z', 228 - flags & PSR_C_BIT ? 'C' : 'c', 229 - flags & PSR_V_BIT ? 'V' : 'v'); 230 - printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n", 231 - interrupts_enabled(regs) ? "n" : "ff", 232 fast_interrupts_enabled(regs) ? "n" : "ff", 233 processor_modes[processor_mode(regs)], 234 thumb_mode(regs) ? " (T)" : "", 235 get_fs() == get_ds() ? "kernel" : "user"); 236 - #if CONFIG_CPU_CP15 237 { 238 unsigned int ctrl; 239 - __asm__ ( 240 - " mrc p15, 0, %0, c1, c0\n" 241 - : "=r" (ctrl)); 242 - printk("Control: %04X\n", ctrl); 243 - } 244 #ifdef CONFIG_CPU_CP15_MMU 245 - { 246 - unsigned int transbase, dac; 247 - __asm__ ( 248 - " mrc p15, 0, %0, c2, c0\n" 249 - " mrc p15, 0, %1, c3, c0\n" 250 - : "=r" (transbase), "=r" (dac)); 251 - printk("Table: %08X DAC: %08X\n", 252 - transbase, dac); 253 - } 254 #endif 255 #endif 256 } 257
··· 28 #include <linux/elfcore.h> 29 #include <linux/pm.h> 30 #include <linux/tick.h> 31 + #include <linux/utsname.h> 32 33 #include <asm/leds.h> 34 #include <asm/processor.h> ··· 199 200 void __show_regs(struct pt_regs *regs) 201 { 202 + unsigned long flags; 203 + char buf[64]; 204 205 + printk("CPU: %d %s (%s %.*s)\n", 206 + smp_processor_id(), print_tainted(), init_utsname()->release, 207 + (int)strcspn(init_utsname()->version, " "), 208 + init_utsname()->version); 209 print_symbol("PC is at %s\n", instruction_pointer(regs)); 210 print_symbol("LR is at %s\n", regs->ARM_lr); 211 + printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n" 212 "sp : %08lx ip : %08lx fp : %08lx\n", 213 + regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr, 214 + regs->ARM_sp, regs->ARM_ip, regs->ARM_fp); 215 printk("r10: %08lx r9 : %08lx r8 : %08lx\n", 216 regs->ARM_r10, regs->ARM_r9, 217 regs->ARM_r8); ··· 218 printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", 219 regs->ARM_r3, regs->ARM_r2, 220 regs->ARM_r1, regs->ARM_r0); 221 + 222 + flags = regs->ARM_cpsr; 223 + buf[0] = flags & PSR_N_BIT ? 'N' : 'n'; 224 + buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z'; 225 + buf[2] = flags & PSR_C_BIT ? 'C' : 'c'; 226 + buf[3] = flags & PSR_V_BIT ? 'V' : 'v'; 227 + buf[4] = '\0'; 228 + 229 + printk("Flags: %s IRQs o%s FIQs o%s Mode %s%s Segment %s\n", 230 + buf, interrupts_enabled(regs) ? "n" : "ff", 231 fast_interrupts_enabled(regs) ? "n" : "ff", 232 processor_modes[processor_mode(regs)], 233 thumb_mode(regs) ? " (T)" : "", 234 get_fs() == get_ds() ? "kernel" : "user"); 235 + #ifdef CONFIG_CPU_CP15 236 { 237 unsigned int ctrl; 238 + 239 + buf[0] = '\0'; 240 #ifdef CONFIG_CPU_CP15_MMU 241 + { 242 + unsigned int transbase, dac; 243 + asm("mrc p15, 0, %0, c2, c0\n\t" 244 + "mrc p15, 0, %1, c3, c0\n" 245 + : "=r" (transbase), "=r" (dac)); 246 + snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x", 247 + transbase, dac); 248 + } 249 #endif 250 + asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl)); 251 + 252 + printk("Control: %08x%s\n", ctrl, buf); 253 + } 254 #endif 255 } 256
+19 -1
arch/arm/kernel/traps.c
··· 204 barrier(); 205 } 206 207 static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 208 { 209 struct task_struct *tsk = thread->task; 210 static int die_counter; 211 212 - printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); 213 print_modules(); 214 __show_regs(regs); 215 printk("Process %s (pid: %d, stack limit = 0x%p)\n", ··· 244 { 245 struct thread_info *thread = current_thread_info(); 246 247 console_verbose(); 248 spin_lock_irq(&die_lock); 249 bust_spinlocks(1); ··· 253 bust_spinlocks(0); 254 spin_unlock_irq(&die_lock); 255 256 if (panic_on_oops) 257 panic("Fatal exception"); 258 259 do_exit(SIGSEGV); 260 } 261
··· 204 barrier(); 205 } 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 + 218 static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 219 { 220 struct task_struct *tsk = thread->task; 221 static int die_counter; 222 223 + printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", 224 + str, err, ++die_counter); 225 print_modules(); 226 __show_regs(regs); 227 printk("Process %s (pid: %d, stack limit = 0x%p)\n", ··· 232 { 233 struct thread_info *thread = current_thread_info(); 234 235 + oops_enter(); 236 + 237 console_verbose(); 238 spin_lock_irq(&die_lock); 239 bust_spinlocks(1); ··· 239 bust_spinlocks(0); 240 spin_unlock_irq(&die_lock); 241 242 + if (in_interrupt()) 243 + panic("Fatal exception in interrupt"); 244 + 245 if (panic_on_oops) 246 panic("Fatal exception"); 247 248 + oops_exit(); 249 do_exit(SIGSEGV); 250 } 251
-3
include/asm-arm/ptrace.h
··· 112 #define fast_interrupts_enabled(regs) \ 113 (!((regs)->ARM_cpsr & PSR_F_BIT)) 114 115 - #define condition_codes(regs) \ 116 - ((regs)->ARM_cpsr & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT)) 117 - 118 /* Are the current registers suitable for user mode? 119 * (used to maintain security in signal handlers) 120 */
··· 112 #define fast_interrupts_enabled(regs) \ 113 (!((regs)->ARM_cpsr & PSR_F_BIT)) 114 115 /* Are the current registers suitable for user mode? 116 * (used to maintain security in signal handlers) 117 */