aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r--arch/x86/kernel/traps_32.c37
1 files changed, 8 insertions, 29 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 05c27ecaf2a7..b132d3957dfc 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -112,7 +112,7 @@ struct stack_frame {
112 112
113static inline unsigned long print_context_stack(struct thread_info *tinfo, 113static inline unsigned long print_context_stack(struct thread_info *tinfo,
114 unsigned long *stack, unsigned long ebp, 114 unsigned long *stack, unsigned long ebp,
115 struct stacktrace_ops *ops, void *data) 115 const struct stacktrace_ops *ops, void *data)
116{ 116{
117#ifdef CONFIG_FRAME_POINTER 117#ifdef CONFIG_FRAME_POINTER
118 struct stack_frame *frame = (struct stack_frame *)ebp; 118 struct stack_frame *frame = (struct stack_frame *)ebp;
@@ -149,7 +149,7 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
149 149
150void dump_trace(struct task_struct *task, struct pt_regs *regs, 150void dump_trace(struct task_struct *task, struct pt_regs *regs,
151 unsigned long *stack, 151 unsigned long *stack,
152 struct stacktrace_ops *ops, void *data) 152 const struct stacktrace_ops *ops, void *data)
153{ 153{
154 unsigned long ebp = 0; 154 unsigned long ebp = 0;
155 155
@@ -221,7 +221,7 @@ static void print_trace_address(void *data, unsigned long addr)
221 touch_nmi_watchdog(); 221 touch_nmi_watchdog();
222} 222}
223 223
224static struct stacktrace_ops print_trace_ops = { 224static const struct stacktrace_ops print_trace_ops = {
225 .warning = print_trace_warning, 225 .warning = print_trace_warning,
226 .warning_symbol = print_trace_warning_symbol, 226 .warning_symbol = print_trace_warning_symbol,
227 .stack = print_trace_stack, 227 .stack = print_trace_stack,
@@ -398,31 +398,24 @@ void die(const char * str, struct pt_regs * regs, long err)
398 local_save_flags(flags); 398 local_save_flags(flags);
399 399
400 if (++die.lock_owner_depth < 3) { 400 if (++die.lock_owner_depth < 3) {
401 int nl = 0;
402 unsigned long esp; 401 unsigned long esp;
403 unsigned short ss; 402 unsigned short ss;
404 403
405 report_bug(regs->eip, regs); 404 report_bug(regs->eip, regs);
406 405
407 printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); 406 printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff,
407 ++die_counter);
408#ifdef CONFIG_PREEMPT 408#ifdef CONFIG_PREEMPT
409 printk(KERN_EMERG "PREEMPT "); 409 printk("PREEMPT ");
410 nl = 1;
411#endif 410#endif
412#ifdef CONFIG_SMP 411#ifdef CONFIG_SMP
413 if (!nl)
414 printk(KERN_EMERG);
415 printk("SMP "); 412 printk("SMP ");
416 nl = 1;
417#endif 413#endif
418#ifdef CONFIG_DEBUG_PAGEALLOC 414#ifdef CONFIG_DEBUG_PAGEALLOC
419 if (!nl)
420 printk(KERN_EMERG);
421 printk("DEBUG_PAGEALLOC"); 415 printk("DEBUG_PAGEALLOC");
422 nl = 1;
423#endif 416#endif
424 if (nl) 417 printk("\n");
425 printk("\n"); 418
426 if (notify_die(DIE_OOPS, str, regs, err, 419 if (notify_die(DIE_OOPS, str, regs, err,
427 current->thread.trap_no, SIGSEGV) != 420 current->thread.trap_no, SIGSEGV) !=
428 NOTIFY_STOP) { 421 NOTIFY_STOP) {
@@ -1112,20 +1105,6 @@ asmlinkage void math_emulate(long arg)
1112 1105
1113#endif /* CONFIG_MATH_EMULATION */ 1106#endif /* CONFIG_MATH_EMULATION */
1114 1107
1115#ifdef CONFIG_X86_F00F_BUG
1116void __init trap_init_f00f_bug(void)
1117{
1118 __set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO);
1119
1120 /*
1121 * Update the IDT descriptor and reload the IDT so that
1122 * it uses the read-only mapped virtual address.
1123 */
1124 idt_descr.address = fix_to_virt(FIX_F00F_IDT);
1125 load_idt(&idt_descr);
1126}
1127#endif
1128
1129/* 1108/*
1130 * This needs to use 'idt_table' rather than 'idt', and 1109 * This needs to use 'idt_table' rather than 'idt', and
1131 * thus use the _nonmapped_ version of the IDT, as the 1110 * thus use the _nonmapped_ version of the IDT, as the