ia64/xen-unstable

changeset 14745:95f329bf49ec

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>
author kfraser@localhost.localdomain
date Thu Apr 05 13:40:43 2007 +0100 (2007-04-05)
parents f1509862f3e6
children afc6f31b7c90
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 13:35:54 2007 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Thu Apr 05 13:40:43 2007 +0100
     1.3 @@ -201,6 +201,19 @@ 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_DEF_CFA rsp,SS+8-\ref
    1.12 +	/*CFI_REL_OFFSET ss,SS-\ref*/
    1.13 +	CFI_REL_OFFSET rsp,RSP-\ref
    1.14 +	/*CFI_REL_OFFSET rflags,EFLAGS-\ref*/
    1.15 +	/*CFI_REL_OFFSET cs,CS-\ref*/
    1.16 +	CFI_REL_OFFSET rip,RIP-\ref
    1.17 +	.endm
    1.18 +
    1.19 +/*
    1.20   * System call entry. Upto 6 arguments in registers are supported.
    1.21   *
    1.22   * SYSCALL does not save anything on the stack and does not change the
    1.23 @@ -232,10 +245,7 @@ END(ret_from_fork)
    1.24   */ 			 		
    1.25  
    1.26  ENTRY(system_call)
    1.27 -	CFI_STARTPROC	simple
    1.28 -	CFI_DEF_CFA	rsp,PDA_STACKOFFSET
    1.29 -	CFI_REGISTER	rip,rcx
    1.30 -	/*CFI_REGISTER	rflags,r11*/
    1.31 +	_frame (RIP-0x10)
    1.32  	SAVE_ARGS -8,0
    1.33  	movq  %rax,ORIG_RAX-ARGOFFSET(%rsp) 
    1.34  	/*
    1.35 @@ -273,9 +283,7 @@ sysret_check:
    1.36  	 */
    1.37  	TRACE_IRQS_ON
    1.38          XEN_UNBLOCK_EVENTS(%rsi)                
    1.39 -	CFI_REGISTER	rip,rcx
    1.40  	RESTORE_ARGS 0,8,0
    1.41 -	/*CFI_REGISTER	rflags,r11*/
    1.42          HYPERVISOR_IRET VGCF_IN_SYSCALL
    1.43  
    1.44  	/* Handle reschedules */
    1.45 @@ -505,24 +513,16 @@ ENTRY(stub_rt_sigreturn)
    1.46  	CFI_ENDPROC
    1.47  END(stub_rt_sigreturn)
    1.48  
    1.49 -/*
    1.50 - * initial frame state for interrupts and exceptions
    1.51 - */
    1.52 -	.macro _frame ref
    1.53 -	CFI_STARTPROC simple
    1.54 -	CFI_DEF_CFA rsp,SS+8-\ref
    1.55 -	/*CFI_REL_OFFSET ss,SS-\ref*/
    1.56 -	CFI_REL_OFFSET rsp,RSP-\ref
    1.57 -	/*CFI_REL_OFFSET rflags,EFLAGS-\ref*/
    1.58 -	/*CFI_REL_OFFSET cs,CS-\ref*/
    1.59 -	CFI_REL_OFFSET rip,RIP-\ref
    1.60 -	.endm
    1.61 +/* initial frame state for interrupts (and exceptions without error code) */
    1.62 +#define INTR_FRAME _frame (RIP-0x10); \
    1.63 +	CFI_REL_OFFSET rcx,0; \
    1.64 +	CFI_REL_OFFSET r11,8
    1.65  
    1.66 -/* initial frame state for interrupts (and exceptions without error code) */
    1.67 -#define INTR_FRAME _frame RIP
    1.68  /* initial frame state for exceptions with error code (and interrupts with
    1.69     vector already pushed) */
    1.70 -#define XCPT_FRAME _frame ORIG_RAX
    1.71 +#define XCPT_FRAME _frame (RIP-0x18); \
    1.72 +	CFI_REL_OFFSET rcx,0; \
    1.73 +	CFI_REL_OFFSET r11,8
    1.74  
    1.75  /* 
    1.76   * Interrupt exit.
    1.77 @@ -599,8 +599,9 @@ retint_kernel:
    1.78  #endif	
    1.79  
    1.80  	CFI_ENDPROC
    1.81 -END(common_interrupt)
    1.82 +END(retint_check)
    1.83  	
    1.84 +#ifndef CONFIG_XEN
    1.85  /*
    1.86   * APIC interrupts.
    1.87   */		
    1.88 @@ -613,7 +614,6 @@ END(common_interrupt)
    1.89  	CFI_ENDPROC
    1.90  	.endm
    1.91  
    1.92 -#ifndef CONFIG_XEN
    1.93  ENTRY(thermal_interrupt)
    1.94  	apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt
    1.95  END(thermal_interrupt)
    1.96 @@ -668,12 +668,16 @@ END(spurious_interrupt)
    1.97  	.macro zeroentry sym
    1.98  	INTR_FRAME
    1.99          movq (%rsp),%rcx
   1.100 +	CFI_RESTORE rcx
   1.101          movq 8(%rsp),%r11
   1.102 +	CFI_RESTORE r11
   1.103          addq $0x10,%rsp /* skip rcx and r11 */
   1.104 +	CFI_ADJUST_CFA_OFFSET -0x10
   1.105  	pushq $0	/* push error code/oldrax */ 
   1.106  	CFI_ADJUST_CFA_OFFSET 8
   1.107  	pushq %rax	/* push real oldrax to the rdi slot */ 
   1.108  	CFI_ADJUST_CFA_OFFSET 8
   1.109 +	CFI_REL_OFFSET rax,0
   1.110  	leaq  \sym(%rip),%rax
   1.111  	jmp error_entry
   1.112  	CFI_ENDPROC
   1.113 @@ -682,10 +686,14 @@ END(spurious_interrupt)
   1.114  	.macro errorentry sym
   1.115  	XCPT_FRAME
   1.116          movq (%rsp),%rcx
   1.117 +	CFI_RESTORE rcx
   1.118          movq 8(%rsp),%r11
   1.119 +	CFI_RESTORE r11
   1.120          addq $0x10,%rsp /* rsp points to the error code */
   1.121 +	CFI_ADJUST_CFA_OFFSET -0x10
   1.122  	pushq %rax
   1.123  	CFI_ADJUST_CFA_OFFSET 8
   1.124 +	CFI_REL_OFFSET rax,0
   1.125  	leaq  \sym(%rip),%rax
   1.126  	jmp error_entry
   1.127  	CFI_ENDPROC
   1.128 @@ -799,6 +807,7 @@ paranoid_schedule\trace:
   1.129   */ 		  				
   1.130  ENTRY(error_entry)
   1.131  	_frame RDI
   1.132 +	CFI_REL_OFFSET rax,0
   1.133  	/* rdi slot contains rax, oldrax contains error code */
   1.134  	cld	
   1.135  	subq  $14*8,%rsp
   1.136 @@ -806,6 +815,7 @@ ENTRY(error_entry)
   1.137  	movq %rsi,13*8(%rsp)
   1.138  	CFI_REL_OFFSET	rsi,RSI
   1.139  	movq 14*8(%rsp),%rsi	/* load rax from rdi slot */
   1.140 +	CFI_REGISTER	rax,rsi
   1.141  	movq %rdx,12*8(%rsp)
   1.142  	CFI_REL_OFFSET	rdx,RDX
   1.143  	movq %rcx,11*8(%rsp)
   1.144 @@ -839,6 +849,7 @@ ENTRY(error_entry)
   1.145  #endif        
   1.146  error_call_handler:
   1.147  	movq %rdi, RDI(%rsp)            
   1.148 +	CFI_REL_OFFSET	rdi,RDI
   1.149  	movq %rsp,%rdi
   1.150  	movq ORIG_RAX(%rsp),%rsi	# get error code 
   1.151  	movq $-1,ORIG_RAX(%rsp)
   1.152 @@ -1186,7 +1197,7 @@ END(int3)
   1.153  
   1.154  ENTRY(overflow)
   1.155  	zeroentry do_overflow
   1.156 -END(debug)
   1.157 +END(overflow)
   1.158  
   1.159  ENTRY(bounds)
   1.160  	zeroentry do_bounds