[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] linux/x86-64: fix unwind information



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1175759952 -3600
# Node ID 07d3208c0ca3b6e746745d2bc08f7aa12ed39269
# Parent  2b24d842bbd31dfccaf4d73aa287c15e0f05181c
linux/x86-64: fix unwind information

Mostly adjusting mis-merges dating back to the 2.6.14 merge.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S |   60 ++++++++++++--------
 1 files changed, 36 insertions(+), 24 deletions(-)

diff -r 2b24d842bbd3 -r 07d3208c0ca3 
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Apr 05 
08:58:32 2007 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Apr 05 
08:59:12 2007 +0100
@@ -201,6 +201,20 @@ END(ret_from_fork)
 END(ret_from_fork)
 
 /*
+ * initial frame state for interrupts and exceptions
+ */
+       .macro _frame ref
+       CFI_STARTPROC simple
+       CFI_SIGNAL_FRAME
+       CFI_DEF_CFA rsp,SS+8-\ref
+       /*CFI_REL_OFFSET ss,SS-\ref*/
+       CFI_REL_OFFSET rsp,RSP-\ref
+       /*CFI_REL_OFFSET rflags,EFLAGS-\ref*/
+       /*CFI_REL_OFFSET cs,CS-\ref*/
+       CFI_REL_OFFSET rip,RIP-\ref
+       .endm
+
+/*
  * System call entry. Upto 6 arguments in registers are supported.
  *
  * SYSCALL does not save anything on the stack and does not change the
@@ -232,10 +246,7 @@ END(ret_from_fork)
  */                                    
 
 ENTRY(system_call)
-       CFI_STARTPROC   simple
-       CFI_DEF_CFA     rsp,PDA_STACKOFFSET
-       CFI_REGISTER    rip,rcx
-       /*CFI_REGISTER  rflags,r11*/
+       _frame (RIP-0x10)
        SAVE_ARGS -8,0
        movq  %rax,ORIG_RAX-ARGOFFSET(%rsp) 
        /*
@@ -273,9 +284,7 @@ sysret_check:
         */
        TRACE_IRQS_ON
         XEN_UNBLOCK_EVENTS(%rsi)                
-       CFI_REGISTER    rip,rcx
        RESTORE_ARGS 0,8,0
-       /*CFI_REGISTER  rflags,r11*/
         HYPERVISOR_IRET VGCF_IN_SYSCALL
 
        /* Handle reschedules */
@@ -505,24 +514,16 @@ ENTRY(stub_rt_sigreturn)
        CFI_ENDPROC
 END(stub_rt_sigreturn)
 
-/*
- * initial frame state for interrupts and exceptions
- */
-       .macro _frame ref
-       CFI_STARTPROC simple
-       CFI_DEF_CFA rsp,SS+8-\ref
-       /*CFI_REL_OFFSET ss,SS-\ref*/
-       CFI_REL_OFFSET rsp,RSP-\ref
-       /*CFI_REL_OFFSET rflags,EFLAGS-\ref*/
-       /*CFI_REL_OFFSET cs,CS-\ref*/
-       CFI_REL_OFFSET rip,RIP-\ref
-       .endm
-
 /* initial frame state for interrupts (and exceptions without error code) */
-#define INTR_FRAME _frame RIP
+#define INTR_FRAME _frame (RIP-0x10); \
+       CFI_REL_OFFSET rcx,0; \
+       CFI_REL_OFFSET r11,8
+
 /* initial frame state for exceptions with error code (and interrupts with
    vector already pushed) */
-#define XCPT_FRAME _frame ORIG_RAX
+#define XCPT_FRAME _frame (RIP-0x18); \
+       CFI_REL_OFFSET rcx,0; \
+       CFI_REL_OFFSET r11,8
 
 /* 
  * Interrupt exit.
@@ -599,8 +600,9 @@ retint_kernel:
 #endif 
 
        CFI_ENDPROC
-END(common_interrupt)
-       
+END(retint_check)
+       
+#ifndef CONFIG_XEN
 /*
  * APIC interrupts.
  */            
@@ -613,7 +615,6 @@ END(common_interrupt)
        CFI_ENDPROC
        .endm
 
-#ifndef CONFIG_XEN
 ENTRY(thermal_interrupt)
        apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt
 END(thermal_interrupt)
@@ -668,12 +669,16 @@ END(spurious_interrupt)
        .macro zeroentry sym
        INTR_FRAME
         movq (%rsp),%rcx
+       CFI_RESTORE rcx
         movq 8(%rsp),%r11
+       CFI_RESTORE r11
         addq $0x10,%rsp /* skip rcx and r11 */
+       CFI_ADJUST_CFA_OFFSET -0x10
        pushq $0        /* push error code/oldrax */ 
        CFI_ADJUST_CFA_OFFSET 8
        pushq %rax      /* push real oldrax to the rdi slot */ 
        CFI_ADJUST_CFA_OFFSET 8
+       CFI_REL_OFFSET rax,0
        leaq  \sym(%rip),%rax
        jmp error_entry
        CFI_ENDPROC
@@ -682,10 +687,14 @@ END(spurious_interrupt)
        .macro errorentry sym
        XCPT_FRAME
         movq (%rsp),%rcx
+       CFI_RESTORE rcx
         movq 8(%rsp),%r11
+       CFI_RESTORE r11
         addq $0x10,%rsp /* rsp points to the error code */
+       CFI_ADJUST_CFA_OFFSET -0x10
        pushq %rax
        CFI_ADJUST_CFA_OFFSET 8
+       CFI_REL_OFFSET rax,0
        leaq  \sym(%rip),%rax
        jmp error_entry
        CFI_ENDPROC
@@ -799,6 +808,7 @@ paranoid_schedule\trace:
  */                                            
 ENTRY(error_entry)
        _frame RDI
+       CFI_REL_OFFSET rax,0
        /* rdi slot contains rax, oldrax contains error code */
        cld     
        subq  $14*8,%rsp
@@ -806,6 +816,7 @@ ENTRY(error_entry)
        movq %rsi,13*8(%rsp)
        CFI_REL_OFFSET  rsi,RSI
        movq 14*8(%rsp),%rsi    /* load rax from rdi slot */
+       CFI_REGISTER    rax,rsi
        movq %rdx,12*8(%rsp)
        CFI_REL_OFFSET  rdx,RDX
        movq %rcx,11*8(%rsp)
@@ -839,6 +850,7 @@ ENTRY(error_entry)
 #endif        
 error_call_handler:
        movq %rdi, RDI(%rsp)            
+       CFI_REL_OFFSET  rdi,RDI
        movq %rsp,%rdi
        movq ORIG_RAX(%rsp),%rsi        # get error code 
        movq $-1,ORIG_RAX(%rsp)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.