Commit 214515b5 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-debug-for-linus' of...

Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Remove pr_<level> uses of KERN_<level>
  therm_throt.c: Trivial printk message fix for a unsuitable abbreviation of 'thermal'
  x86: Use {push,pop}{l,q}_cfi in more places
  i386: Add unwind directives to syscall ptregs stubs
  x86-64: Use symbolics instead of raw numbers in entry_64.S
  x86-64: Adjust frame type at paranoid_exit:
  x86-64: Fix unwind annotations in syscall stubs
parents bf70030d d0ed0c32
...@@ -89,6 +89,16 @@ ...@@ -89,6 +89,16 @@
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
.endm .endm
.macro pushfq_cfi
pushfq
CFI_ADJUST_CFA_OFFSET 8
.endm
.macro popfq_cfi
popfq
CFI_ADJUST_CFA_OFFSET -8
.endm
.macro movq_cfi reg offset=0 .macro movq_cfi reg offset=0
movq %\reg, \offset(%rsp) movq %\reg, \offset(%rsp)
CFI_REL_OFFSET \reg, \offset CFI_REL_OFFSET \reg, \offset
...@@ -109,6 +119,16 @@ ...@@ -109,6 +119,16 @@
CFI_ADJUST_CFA_OFFSET -4 CFI_ADJUST_CFA_OFFSET -4
.endm .endm
.macro pushfl_cfi
pushfl
CFI_ADJUST_CFA_OFFSET 4
.endm
.macro popfl_cfi
popfl
CFI_ADJUST_CFA_OFFSET -4
.endm
.macro movl_cfi reg offset=0 .macro movl_cfi reg offset=0
movl %\reg, \offset(%esp) movl %\reg, \offset(%esp)
CFI_REL_OFFSET \reg, \offset CFI_REL_OFFSET \reg, \offset
......
...@@ -398,7 +398,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n, ...@@ -398,7 +398,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n,
} }
break; break;
default: default:
pr_debug(KERN_INFO "APBT notified %lu, no action\n", action); pr_debug("APBT notified %lu, no action\n", action);
} }
return NOTIFY_OK; return NOTIFY_OK;
} }
...@@ -552,7 +552,7 @@ static cycle_t apbt_read_clocksource(struct clocksource *cs) ...@@ -552,7 +552,7 @@ static cycle_t apbt_read_clocksource(struct clocksource *cs)
pr_debug("APB CS going back %lx:%lx:%lx ", pr_debug("APB CS going back %lx:%lx:%lx ",
t2, last_read, t2 - last_read); t2, last_read, t2 - last_read);
bad_count_x3: bad_count_x3:
pr_debug(KERN_INFO "tripple check enforced\n"); pr_debug("triple check enforced\n");
t0 = apbt_readl(phy_cs_timer_id, t0 = apbt_readl(phy_cs_timer_id,
APBTMR_N_CURRENT_VALUE); APBTMR_N_CURRENT_VALUE);
udelay(1); udelay(1);
......
...@@ -350,7 +350,7 @@ static void intel_thermal_interrupt(void) ...@@ -350,7 +350,7 @@ static void intel_thermal_interrupt(void)
static void unexpected_thermal_interrupt(void) static void unexpected_thermal_interrupt(void)
{ {
printk(KERN_ERR "CPU%d: Unexpected LVT TMR interrupt!\n", printk(KERN_ERR "CPU%d: Unexpected LVT thermal interrupt!\n",
smp_processor_id()); smp_processor_id());
add_taint(TAINT_MACHINE_CHECK); add_taint(TAINT_MACHINE_CHECK);
} }
......
This diff is collapsed.
...@@ -213,23 +213,17 @@ ENDPROC(native_usergs_sysret64) ...@@ -213,23 +213,17 @@ ENDPROC(native_usergs_sysret64)
.macro FAKE_STACK_FRAME child_rip .macro FAKE_STACK_FRAME child_rip
/* push in order ss, rsp, eflags, cs, rip */ /* push in order ss, rsp, eflags, cs, rip */
xorl %eax, %eax xorl %eax, %eax
pushq $__KERNEL_DS /* ss */ pushq_cfi $__KERNEL_DS /* ss */
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET ss,0*/ /*CFI_REL_OFFSET ss,0*/
pushq %rax /* rsp */ pushq_cfi %rax /* rsp */
CFI_ADJUST_CFA_OFFSET 8
CFI_REL_OFFSET rsp,0 CFI_REL_OFFSET rsp,0
pushq $X86_EFLAGS_IF /* eflags - interrupts on */ pushq_cfi $X86_EFLAGS_IF /* eflags - interrupts on */
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET rflags,0*/ /*CFI_REL_OFFSET rflags,0*/
pushq $__KERNEL_CS /* cs */ pushq_cfi $__KERNEL_CS /* cs */
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET cs,0*/ /*CFI_REL_OFFSET cs,0*/
pushq \child_rip /* rip */ pushq_cfi \child_rip /* rip */
CFI_ADJUST_CFA_OFFSET 8
CFI_REL_OFFSET rip,0 CFI_REL_OFFSET rip,0
pushq %rax /* orig rax */ pushq_cfi %rax /* orig rax */
CFI_ADJUST_CFA_OFFSET 8
.endm .endm
.macro UNFAKE_STACK_FRAME .macro UNFAKE_STACK_FRAME
...@@ -398,10 +392,8 @@ ENTRY(ret_from_fork) ...@@ -398,10 +392,8 @@ ENTRY(ret_from_fork)
LOCK ; btr $TIF_FORK,TI_flags(%r8) LOCK ; btr $TIF_FORK,TI_flags(%r8)
push kernel_eflags(%rip) pushq_cfi kernel_eflags(%rip)
CFI_ADJUST_CFA_OFFSET 8 popfq_cfi # reset kernel eflags
popf # reset kernel eflags
CFI_ADJUST_CFA_OFFSET -8
call schedule_tail # rdi: 'prev' task parameter call schedule_tail # rdi: 'prev' task parameter
...@@ -521,11 +513,9 @@ sysret_careful: ...@@ -521,11 +513,9 @@ sysret_careful:
jnc sysret_signal jnc sysret_signal
TRACE_IRQS_ON TRACE_IRQS_ON
ENABLE_INTERRUPTS(CLBR_NONE) ENABLE_INTERRUPTS(CLBR_NONE)
pushq %rdi pushq_cfi %rdi
CFI_ADJUST_CFA_OFFSET 8
call schedule call schedule
popq %rdi popq_cfi %rdi
CFI_ADJUST_CFA_OFFSET -8
jmp sysret_check jmp sysret_check
/* Handle a signal */ /* Handle a signal */
...@@ -634,11 +624,9 @@ int_careful: ...@@ -634,11 +624,9 @@ int_careful:
jnc int_very_careful jnc int_very_careful
TRACE_IRQS_ON TRACE_IRQS_ON
ENABLE_INTERRUPTS(CLBR_NONE) ENABLE_INTERRUPTS(CLBR_NONE)
pushq %rdi pushq_cfi %rdi
CFI_ADJUST_CFA_OFFSET 8
call schedule call schedule
popq %rdi popq_cfi %rdi
CFI_ADJUST_CFA_OFFSET -8
DISABLE_INTERRUPTS(CLBR_NONE) DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF TRACE_IRQS_OFF
jmp int_with_check jmp int_with_check
...@@ -652,12 +640,10 @@ int_check_syscall_exit_work: ...@@ -652,12 +640,10 @@ int_check_syscall_exit_work:
/* Check for syscall exit trace */ /* Check for syscall exit trace */
testl $_TIF_WORK_SYSCALL_EXIT,%edx testl $_TIF_WORK_SYSCALL_EXIT,%edx
jz int_signal jz int_signal
pushq %rdi pushq_cfi %rdi
CFI_ADJUST_CFA_OFFSET 8
leaq 8(%rsp),%rdi # &ptregs -> arg1 leaq 8(%rsp),%rdi # &ptregs -> arg1
call syscall_trace_leave call syscall_trace_leave
popq %rdi popq_cfi %rdi
CFI_ADJUST_CFA_OFFSET -8
andl $~(_TIF_WORK_SYSCALL_EXIT|_TIF_SYSCALL_EMU),%edi andl $~(_TIF_WORK_SYSCALL_EXIT|_TIF_SYSCALL_EMU),%edi
jmp int_restore_rest jmp int_restore_rest
...@@ -714,9 +700,8 @@ END(ptregscall_common) ...@@ -714,9 +700,8 @@ END(ptregscall_common)
ENTRY(stub_execve) ENTRY(stub_execve)
CFI_STARTPROC CFI_STARTPROC
popq %r11 addq $8, %rsp
CFI_ADJUST_CFA_OFFSET -8 PARTIAL_FRAME 0
CFI_REGISTER rip, r11
SAVE_REST SAVE_REST
FIXUP_TOP_OF_STACK %r11 FIXUP_TOP_OF_STACK %r11
movq %rsp, %rcx movq %rsp, %rcx
...@@ -735,7 +720,7 @@ END(stub_execve) ...@@ -735,7 +720,7 @@ END(stub_execve)
ENTRY(stub_rt_sigreturn) ENTRY(stub_rt_sigreturn)
CFI_STARTPROC CFI_STARTPROC
addq $8, %rsp addq $8, %rsp
CFI_ADJUST_CFA_OFFSET -8 PARTIAL_FRAME 0
SAVE_REST SAVE_REST
movq %rsp,%rdi movq %rsp,%rdi
FIXUP_TOP_OF_STACK %r11 FIXUP_TOP_OF_STACK %r11
...@@ -766,8 +751,7 @@ vector=FIRST_EXTERNAL_VECTOR ...@@ -766,8 +751,7 @@ vector=FIRST_EXTERNAL_VECTOR
.if vector <> FIRST_EXTERNAL_VECTOR .if vector <> FIRST_EXTERNAL_VECTOR
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
.endif .endif
1: pushq $(~vector+0x80) /* Note: always in signed byte range */ 1: pushq_cfi $(~vector+0x80) /* Note: always in signed byte range */
CFI_ADJUST_CFA_OFFSET 8
.if ((vector-FIRST_EXTERNAL_VECTOR)%7) <> 6 .if ((vector-FIRST_EXTERNAL_VECTOR)%7) <> 6
jmp 2f jmp 2f
.endif .endif
...@@ -796,8 +780,8 @@ END(interrupt) ...@@ -796,8 +780,8 @@ END(interrupt)
/* 0(%rsp): ~(interrupt number) */ /* 0(%rsp): ~(interrupt number) */
.macro interrupt func .macro interrupt func
subq $10*8, %rsp subq $ORIG_RAX-ARGOFFSET+8, %rsp
CFI_ADJUST_CFA_OFFSET 10*8 CFI_ADJUST_CFA_OFFSET ORIG_RAX-ARGOFFSET+8
call save_args call save_args
PARTIAL_FRAME 0 PARTIAL_FRAME 0
call \func call \func
...@@ -822,6 +806,7 @@ ret_from_intr: ...@@ -822,6 +806,7 @@ ret_from_intr:
TRACE_IRQS_OFF TRACE_IRQS_OFF
decl PER_CPU_VAR(irq_count) decl PER_CPU_VAR(irq_count)
leaveq leaveq
CFI_RESTORE rbp
CFI_DEF_CFA_REGISTER rsp CFI_DEF_CFA_REGISTER rsp
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
exit_intr: exit_intr:
...@@ -903,11 +888,9 @@ retint_careful: ...@@ -903,11 +888,9 @@ retint_careful:
jnc retint_signal jnc retint_signal
TRACE_IRQS_ON TRACE_IRQS_ON
ENABLE_INTERRUPTS(CLBR_NONE) ENABLE_INTERRUPTS(CLBR_NONE)
pushq %rdi pushq_cfi %rdi
CFI_ADJUST_CFA_OFFSET 8
call schedule call schedule
popq %rdi popq_cfi %rdi
CFI_ADJUST_CFA_OFFSET -8
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
DISABLE_INTERRUPTS(CLBR_NONE) DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF TRACE_IRQS_OFF
...@@ -956,8 +939,7 @@ END(common_interrupt) ...@@ -956,8 +939,7 @@ END(common_interrupt)
.macro apicinterrupt num sym do_sym .macro apicinterrupt num sym do_sym
ENTRY(\sym) ENTRY(\sym)
INTR_FRAME INTR_FRAME
pushq $~(\num) pushq_cfi $~(\num)
CFI_ADJUST_CFA_OFFSET 8
interrupt \do_sym interrupt \do_sym
jmp ret_from_intr jmp ret_from_intr
CFI_ENDPROC CFI_ENDPROC
...@@ -1036,8 +1018,8 @@ ENTRY(\sym) ...@@ -1036,8 +1018,8 @@ ENTRY(\sym)
INTR_FRAME INTR_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $15*8,%rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET 15*8 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call error_entry call error_entry
DEFAULT_FRAME 0 DEFAULT_FRAME 0
movq %rsp,%rdi /* pt_regs pointer */ movq %rsp,%rdi /* pt_regs pointer */
...@@ -1052,9 +1034,9 @@ END(\sym) ...@@ -1052,9 +1034,9 @@ END(\sym)
ENTRY(\sym) ENTRY(\sym)
INTR_FRAME INTR_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
CFI_ADJUST_CFA_OFFSET 8 subq $ORIG_RAX-R15, %rsp
subq $15*8, %rsp CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid call save_paranoid
TRACE_IRQS_OFF TRACE_IRQS_OFF
movq %rsp,%rdi /* pt_regs pointer */ movq %rsp,%rdi /* pt_regs pointer */
...@@ -1070,9 +1052,9 @@ END(\sym) ...@@ -1070,9 +1052,9 @@ END(\sym)
ENTRY(\sym) ENTRY(\sym)
INTR_FRAME INTR_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
CFI_ADJUST_CFA_OFFSET 8 subq $ORIG_RAX-R15, %rsp
subq $15*8, %rsp CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid call save_paranoid
TRACE_IRQS_OFF TRACE_IRQS_OFF
movq %rsp,%rdi /* pt_regs pointer */ movq %rsp,%rdi /* pt_regs pointer */
...@@ -1089,8 +1071,8 @@ END(\sym) ...@@ -1089,8 +1071,8 @@ END(\sym)
ENTRY(\sym) ENTRY(\sym)
XCPT_FRAME XCPT_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $15*8,%rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET 15*8 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call error_entry call error_entry
DEFAULT_FRAME 0 DEFAULT_FRAME 0
movq %rsp,%rdi /* pt_regs pointer */ movq %rsp,%rdi /* pt_regs pointer */
...@@ -1107,8 +1089,8 @@ END(\sym) ...@@ -1107,8 +1089,8 @@ END(\sym)
ENTRY(\sym) ENTRY(\sym)
XCPT_FRAME XCPT_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $15*8,%rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET 15*8 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid call save_paranoid
DEFAULT_FRAME 0 DEFAULT_FRAME 0
TRACE_IRQS_OFF TRACE_IRQS_OFF
...@@ -1139,16 +1121,14 @@ zeroentry simd_coprocessor_error do_simd_coprocessor_error ...@@ -1139,16 +1121,14 @@ zeroentry simd_coprocessor_error do_simd_coprocessor_error
/* edi: new selector */ /* edi: new selector */
ENTRY(native_load_gs_index) ENTRY(native_load_gs_index)
CFI_STARTPROC CFI_STARTPROC
pushf pushfq_cfi
CFI_ADJUST_CFA_OFFSET 8
DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI) DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI)
SWAPGS SWAPGS
gs_change: gs_change:
movl %edi,%gs movl %edi,%gs
2: mfence /* workaround */ 2: mfence /* workaround */
SWAPGS SWAPGS
popf popfq_cfi
CFI_ADJUST_CFA_OFFSET -8
ret ret
CFI_ENDPROC CFI_ENDPROC
END(native_load_gs_index) END(native_load_gs_index)
...@@ -1215,8 +1195,7 @@ END(kernel_execve) ...@@ -1215,8 +1195,7 @@ END(kernel_execve)
/* Call softirq on interrupt stack. Interrupts are off. */ /* Call softirq on interrupt stack. Interrupts are off. */
ENTRY(call_softirq) ENTRY(call_softirq)
CFI_STARTPROC CFI_STARTPROC
push %rbp pushq_cfi %rbp
CFI_ADJUST_CFA_OFFSET 8
CFI_REL_OFFSET rbp,0 CFI_REL_OFFSET rbp,0
mov %rsp,%rbp mov %rsp,%rbp
CFI_DEF_CFA_REGISTER rbp CFI_DEF_CFA_REGISTER rbp
...@@ -1225,6 +1204,7 @@ ENTRY(call_softirq) ...@@ -1225,6 +1204,7 @@ ENTRY(call_softirq)
push %rbp # backlink for old unwinder push %rbp # backlink for old unwinder
call __do_softirq call __do_softirq
leaveq leaveq
CFI_RESTORE rbp
CFI_DEF_CFA_REGISTER rsp CFI_DEF_CFA_REGISTER rsp
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
decl PER_CPU_VAR(irq_count) decl PER_CPU_VAR(irq_count)
...@@ -1368,7 +1348,7 @@ paranoidzeroentry machine_check *machine_check_vector(%rip) ...@@ -1368,7 +1348,7 @@ paranoidzeroentry machine_check *machine_check_vector(%rip)
/* ebx: no swapgs flag */ /* ebx: no swapgs flag */
ENTRY(paranoid_exit) ENTRY(paranoid_exit)
INTR_FRAME DEFAULT_FRAME
DISABLE_INTERRUPTS(CLBR_NONE) DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF TRACE_IRQS_OFF
testl %ebx,%ebx /* swapgs needed? */ testl %ebx,%ebx /* swapgs needed? */
...@@ -1445,7 +1425,6 @@ error_swapgs: ...@@ -1445,7 +1425,6 @@ error_swapgs:
error_sti: error_sti:
TRACE_IRQS_OFF TRACE_IRQS_OFF
ret ret
CFI_ENDPROC
/* /*
* There are two places in the kernel that can potentially fault with * There are two places in the kernel that can potentially fault with
...@@ -1470,6 +1449,7 @@ bstep_iret: ...@@ -1470,6 +1449,7 @@ bstep_iret:
/* Fix truncated RIP */ /* Fix truncated RIP */
movq %rcx,RIP+8(%rsp) movq %rcx,RIP+8(%rsp)
jmp error_swapgs jmp error_swapgs
CFI_ENDPROC
END(error_entry) END(error_entry)
...@@ -1498,8 +1478,8 @@ ENTRY(nmi) ...@@ -1498,8 +1478,8 @@ ENTRY(nmi)
INTR_FRAME INTR_FRAME
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 pushq_cfi $-1
subq $15*8, %rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET 15*8 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
call save_paranoid call save_paranoid
DEFAULT_FRAME 0 DEFAULT_FRAME 0
/* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment