ia64/xen-unstable
changeset 14735:07d3208c0ca3
linux/x86-64: fix unwind information
Mostly adjusting mis-merges dating back to the 2.6.14 merge.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Mostly adjusting mis-merges dating back to the 2.6.14 merge.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Apr 05 08:59:12 2007 +0100 (2007-04-05) |
parents | 2b24d842bbd3 |
children | 14c25e48a557 |
files | linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Thu Apr 05 08:58:32 2007 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Thu Apr 05 08:59:12 2007 +0100 1.3 @@ -201,6 +201,20 @@ rff_trace: 1.4 END(ret_from_fork) 1.5 1.6 /* 1.7 + * initial frame state for interrupts and exceptions 1.8 + */ 1.9 + .macro _frame ref 1.10 + CFI_STARTPROC simple 1.11 + CFI_SIGNAL_FRAME 1.12 + CFI_DEF_CFA rsp,SS+8-\ref 1.13 + /*CFI_REL_OFFSET ss,SS-\ref*/ 1.14 + CFI_REL_OFFSET rsp,RSP-\ref 1.15 + /*CFI_REL_OFFSET rflags,EFLAGS-\ref*/ 1.16 + /*CFI_REL_OFFSET cs,CS-\ref*/ 1.17 + CFI_REL_OFFSET rip,RIP-\ref 1.18 + .endm 1.19 + 1.20 +/* 1.21 * System call entry. Upto 6 arguments in registers are supported. 1.22 * 1.23 * SYSCALL does not save anything on the stack and does not change the 1.24 @@ -232,10 +246,7 @@ END(ret_from_fork) 1.25 */ 1.26 1.27 ENTRY(system_call) 1.28 - CFI_STARTPROC simple 1.29 - CFI_DEF_CFA rsp,PDA_STACKOFFSET 1.30 - CFI_REGISTER rip,rcx 1.31 - /*CFI_REGISTER rflags,r11*/ 1.32 + _frame (RIP-0x10) 1.33 SAVE_ARGS -8,0 1.34 movq %rax,ORIG_RAX-ARGOFFSET(%rsp) 1.35 /* 1.36 @@ -273,9 +284,7 @@ sysret_check: 1.37 */ 1.38 TRACE_IRQS_ON 1.39 XEN_UNBLOCK_EVENTS(%rsi) 1.40 - CFI_REGISTER rip,rcx 1.41 RESTORE_ARGS 0,8,0 1.42 - /*CFI_REGISTER rflags,r11*/ 1.43 HYPERVISOR_IRET VGCF_IN_SYSCALL 1.44 1.45 /* Handle reschedules */ 1.46 @@ -505,24 +514,16 @@ ENTRY(stub_rt_sigreturn) 1.47 CFI_ENDPROC 1.48 END(stub_rt_sigreturn) 1.49 1.50 -/* 1.51 - * initial frame state for interrupts and exceptions 1.52 - */ 1.53 - .macro _frame ref 1.54 - CFI_STARTPROC simple 1.55 - CFI_DEF_CFA rsp,SS+8-\ref 1.56 - /*CFI_REL_OFFSET ss,SS-\ref*/ 1.57 - CFI_REL_OFFSET rsp,RSP-\ref 1.58 - /*CFI_REL_OFFSET rflags,EFLAGS-\ref*/ 1.59 - /*CFI_REL_OFFSET cs,CS-\ref*/ 1.60 - CFI_REL_OFFSET rip,RIP-\ref 1.61 - .endm 1.62 +/* initial frame state for interrupts (and exceptions without error code) */ 1.63 +#define INTR_FRAME _frame (RIP-0x10); \ 1.64 + CFI_REL_OFFSET rcx,0; \ 1.65 + CFI_REL_OFFSET r11,8 1.66 1.67 -/* initial frame state for interrupts (and exceptions without error code) */ 1.68 -#define INTR_FRAME _frame RIP 1.69 /* initial frame state for exceptions with error code (and interrupts with 1.70 vector already pushed) */ 1.71 -#define XCPT_FRAME _frame ORIG_RAX 1.72 +#define XCPT_FRAME _frame (RIP-0x18); \ 1.73 + CFI_REL_OFFSET rcx,0; \ 1.74 + CFI_REL_OFFSET r11,8 1.75 1.76 /* 1.77 * Interrupt exit. 1.78 @@ -599,8 +600,9 @@ retint_kernel: 1.79 #endif 1.80 1.81 CFI_ENDPROC 1.82 -END(common_interrupt) 1.83 +END(retint_check) 1.84 1.85 +#ifndef CONFIG_XEN 1.86 /* 1.87 * APIC interrupts. 1.88 */ 1.89 @@ -613,7 +615,6 @@ END(common_interrupt) 1.90 CFI_ENDPROC 1.91 .endm 1.92 1.93 -#ifndef CONFIG_XEN 1.94 ENTRY(thermal_interrupt) 1.95 apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt 1.96 END(thermal_interrupt) 1.97 @@ -668,12 +669,16 @@ END(spurious_interrupt) 1.98 .macro zeroentry sym 1.99 INTR_FRAME 1.100 movq (%rsp),%rcx 1.101 + CFI_RESTORE rcx 1.102 movq 8(%rsp),%r11 1.103 + CFI_RESTORE r11 1.104 addq $0x10,%rsp /* skip rcx and r11 */ 1.105 + CFI_ADJUST_CFA_OFFSET -0x10 1.106 pushq $0 /* push error code/oldrax */ 1.107 CFI_ADJUST_CFA_OFFSET 8 1.108 pushq %rax /* push real oldrax to the rdi slot */ 1.109 CFI_ADJUST_CFA_OFFSET 8 1.110 + CFI_REL_OFFSET rax,0 1.111 leaq \sym(%rip),%rax 1.112 jmp error_entry 1.113 CFI_ENDPROC 1.114 @@ -682,10 +687,14 @@ END(spurious_interrupt) 1.115 .macro errorentry sym 1.116 XCPT_FRAME 1.117 movq (%rsp),%rcx 1.118 + CFI_RESTORE rcx 1.119 movq 8(%rsp),%r11 1.120 + CFI_RESTORE r11 1.121 addq $0x10,%rsp /* rsp points to the error code */ 1.122 + CFI_ADJUST_CFA_OFFSET -0x10 1.123 pushq %rax 1.124 CFI_ADJUST_CFA_OFFSET 8 1.125 + CFI_REL_OFFSET rax,0 1.126 leaq \sym(%rip),%rax 1.127 jmp error_entry 1.128 CFI_ENDPROC 1.129 @@ -799,6 +808,7 @@ paranoid_schedule\trace: 1.130 */ 1.131 ENTRY(error_entry) 1.132 _frame RDI 1.133 + CFI_REL_OFFSET rax,0 1.134 /* rdi slot contains rax, oldrax contains error code */ 1.135 cld 1.136 subq $14*8,%rsp 1.137 @@ -806,6 +816,7 @@ ENTRY(error_entry) 1.138 movq %rsi,13*8(%rsp) 1.139 CFI_REL_OFFSET rsi,RSI 1.140 movq 14*8(%rsp),%rsi /* load rax from rdi slot */ 1.141 + CFI_REGISTER rax,rsi 1.142 movq %rdx,12*8(%rsp) 1.143 CFI_REL_OFFSET rdx,RDX 1.144 movq %rcx,11*8(%rsp) 1.145 @@ -839,6 +850,7 @@ ENTRY(error_entry) 1.146 #endif 1.147 error_call_handler: 1.148 movq %rdi, RDI(%rsp) 1.149 + CFI_REL_OFFSET rdi,RDI 1.150 movq %rsp,%rdi 1.151 movq ORIG_RAX(%rsp),%rsi # get error code 1.152 movq $-1,ORIG_RAX(%rsp)