Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257085
b: refs/heads/master
c: 1871853
h: refs/heads/master
i:
  257083: 38260c1
v: v3
  • Loading branch information
Frederic Weisbecker committed Jul 2, 2011
1 parent fb83ad5 commit 20f1a88
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47ce11a2b6519f9c7843223ea8e561eb71ea5896
refs/heads/master: 1871853f7abc3c727c4346539c5062cbeaf016a4
44 changes: 17 additions & 27 deletions trunk/arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -297,27 +297,22 @@ ENDPROC(native_usergs_sysret64)
.endm

/* save partial stack frame */
.pushsection .kprobes.text, "ax"
ENTRY(save_args)
XCPT_FRAME
.macro SAVE_ARGS_IRQ
cld
/*
* start from rbp in pt_regs and jump over
* return address.
*/
movq_cfi rdi, RDI+8-RBP
movq_cfi rsi, RSI+8-RBP
movq_cfi rdx, RDX+8-RBP
movq_cfi rcx, RCX+8-RBP
movq_cfi rax, RAX+8-RBP
movq_cfi r8, R8+8-RBP
movq_cfi r9, R9+8-RBP
movq_cfi r10, R10+8-RBP
movq_cfi r11, R11+8-RBP

leaq -RBP+8(%rsp),%rdi /* arg1 for handler */
movq_cfi rbp, 8 /* push %rbp */
leaq 8(%rsp), %rbp /* mov %rsp, %ebp */
/* start from rbp in pt_regs and jump over */
movq_cfi rdi, RDI-RBP
movq_cfi rsi, RSI-RBP
movq_cfi rdx, RDX-RBP
movq_cfi rcx, RCX-RBP
movq_cfi rax, RAX-RBP
movq_cfi r8, R8-RBP
movq_cfi r9, R9-RBP
movq_cfi r10, R10-RBP
movq_cfi r11, R11-RBP

leaq -RBP(%rsp),%rdi /* arg1 for handler */
movq_cfi rbp, 0 /* push %rbp */
movq %rsp, %rbp
testl $3, CS(%rdi)
je 1f
SWAPGS
Expand All @@ -329,19 +324,14 @@ ENTRY(save_args)
*/
1: incl PER_CPU_VAR(irq_count)
jne 2f
popq_cfi %rax /* move return address... */
mov PER_CPU_VAR(irq_stack_ptr),%rsp
EMPTY_FRAME 0
pushq_cfi %rbp /* backlink for unwinder */
pushq_cfi %rax /* ... to the new stack */
/*
* We entered an interrupt context - irqs are off:
*/
2: TRACE_IRQS_OFF
ret
CFI_ENDPROC
END(save_args)
.popsection
.endm

ENTRY(save_rest)
PARTIAL_FRAME 1 REST_SKIP+8
Expand Down Expand Up @@ -791,7 +781,7 @@ END(interrupt)
/* reserve pt_regs for scratch regs and rbp */
subq $ORIG_RAX-RBP, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP
call save_args
SAVE_ARGS_IRQ
PARTIAL_FRAME 0
call \func
.endm
Expand Down

0 comments on commit 20f1a88

Please sign in to comment.