diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-21 09:20:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-21 09:20:47 -0500 |
commit | 14ae22ba2b8bb3d53fb795f9b8074aa39ef7b6cd (patch) | |
tree | 80883b2043ee9fd1a9a7b088ddf6fea17cc4b672 /arch/x86/kernel/entry_64.S | |
parent | e8a0e27662186f8856a0a6242e7a8386c9a64a53 (diff) |
x86: entry_64.S: rename
Impact: cleanup
Rename:
CFI_PUSHQ => pushq_cfi
CFI_POPQ => popq_cfi
CFI_MOVQ => movq_cfi
To make it blend better into regular assembly code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 4e3d83678f85..92c5e18340db 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -63,17 +63,17 @@ | |||
63 | /* | 63 | /* |
64 | * Some macro's to hide the most frequently occuring CFI annotations. | 64 | * Some macro's to hide the most frequently occuring CFI annotations. |
65 | */ | 65 | */ |
66 | .macro CFI_PUSHQ reg | 66 | .macro pushq_cfi reg |
67 | pushq \reg | 67 | pushq \reg |
68 | CFI_ADJUST_CFA_OFFSET 8 | 68 | CFI_ADJUST_CFA_OFFSET 8 |
69 | .endm | 69 | .endm |
70 | 70 | ||
71 | .macro CFI_POPQ reg | 71 | .macro popq_cfi reg |
72 | popq \reg | 72 | popq \reg |
73 | CFI_ADJUST_CFA_OFFSET -8 | 73 | CFI_ADJUST_CFA_OFFSET -8 |
74 | .endm | 74 | .endm |
75 | 75 | ||
76 | .macro CFI_MOVQ reg offset=0 | 76 | .macro movq_cfi reg offset=0 |
77 | movq %\reg, \offset(%rsp) | 77 | movq %\reg, \offset(%rsp) |
78 | CFI_REL_OFFSET \reg, \offset | 78 | CFI_REL_OFFSET \reg, \offset |
79 | .endm | 79 | .endm |
@@ -297,17 +297,18 @@ ENTRY(native_usergs_sysret64) | |||
297 | ENTRY(save_args) | 297 | ENTRY(save_args) |
298 | XCPT_FRAME | 298 | XCPT_FRAME |
299 | cld | 299 | cld |
300 | CFI_MOVQ rdi, RDI+16-ARGOFFSET | 300 | movq_cfi rdi, RDI+16-ARGOFFSET |
301 | CFI_MOVQ rsi, RSI+16-ARGOFFSET | 301 | movq_cfi rsi, RSI+16-ARGOFFSET |
302 | CFI_MOVQ rdx, RDX+16-ARGOFFSET | 302 | movq_cfi rdx, RDX+16-ARGOFFSET |
303 | CFI_MOVQ rcx, RCX+16-ARGOFFSET | 303 | movq_cfi rcx, RCX+16-ARGOFFSET |
304 | CFI_MOVQ rax, RAX+16-ARGOFFSET | 304 | movq_cfi rax, RAX+16-ARGOFFSET |
305 | CFI_MOVQ r8, R8+16-ARGOFFSET | 305 | movq_cfi r8, R8+16-ARGOFFSET |
306 | CFI_MOVQ r9, R9+16-ARGOFFSET | 306 | movq_cfi r9, R9+16-ARGOFFSET |
307 | CFI_MOVQ r10, R10+16-ARGOFFSET | 307 | movq_cfi r10, R10+16-ARGOFFSET |
308 | CFI_MOVQ r11, R11+16-ARGOFFSET | 308 | movq_cfi r11, R11+16-ARGOFFSET |
309 | |||
309 | leaq -ARGOFFSET+16(%rsp),%rdi /* arg1 for handler */ | 310 | leaq -ARGOFFSET+16(%rsp),%rdi /* arg1 for handler */ |
310 | CFI_MOVQ rbp, 8 /* push %rbp */ | 311 | movq_cfi rbp, 8 /* push %rbp */ |
311 | leaq 8(%rsp), %rbp /* mov %rsp, %ebp */ | 312 | leaq 8(%rsp), %rbp /* mov %rsp, %ebp */ |
312 | testl $3, CS(%rdi) | 313 | testl $3, CS(%rdi) |
313 | je 1f | 314 | je 1f |
@@ -320,10 +321,10 @@ ENTRY(save_args) | |||
320 | */ | 321 | */ |
321 | 1: incl %gs:pda_irqcount | 322 | 1: incl %gs:pda_irqcount |
322 | jne 2f | 323 | jne 2f |
323 | CFI_POPQ %rax /* move return address... */ | 324 | popq_cfi %rax /* move return address... */ |
324 | mov %gs:pda_irqstackptr,%rsp | 325 | mov %gs:pda_irqstackptr,%rsp |
325 | EMPTY_FRAME 0 | 326 | EMPTY_FRAME 0 |
326 | CFI_PUSHQ %rax /* ... to the new stack */ | 327 | pushq_cfi %rax /* ... to the new stack */ |
327 | /* | 328 | /* |
328 | * We entered an interrupt context - irqs are off: | 329 | * We entered an interrupt context - irqs are off: |
329 | */ | 330 | */ |
@@ -968,7 +969,7 @@ END(spurious_interrupt) | |||
968 | .macro zeroentry sym | 969 | .macro zeroentry sym |
969 | INTR_FRAME | 970 | INTR_FRAME |
970 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 971 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
971 | CFI_PUSHQ $-1 /* ORIG_RAX: no syscall to restart */ | 972 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ |
972 | subq $15*8,%rsp | 973 | subq $15*8,%rsp |
973 | CFI_ADJUST_CFA_OFFSET 15*8 | 974 | CFI_ADJUST_CFA_OFFSET 15*8 |
974 | call error_entry | 975 | call error_entry |
@@ -1103,21 +1104,21 @@ KPROBE_ENTRY(error_entry) | |||
1103 | CFI_ADJUST_CFA_OFFSET 15*8 | 1104 | CFI_ADJUST_CFA_OFFSET 15*8 |
1104 | /* oldrax contains error code */ | 1105 | /* oldrax contains error code */ |
1105 | cld | 1106 | cld |
1106 | CFI_MOVQ rdi, RDI+8 | 1107 | movq_cfi rdi, RDI+8 |
1107 | CFI_MOVQ rsi, RSI+8 | 1108 | movq_cfi rsi, RSI+8 |
1108 | CFI_MOVQ rdx, RDX+8 | 1109 | movq_cfi rdx, RDX+8 |
1109 | CFI_MOVQ rcx, RCX+8 | 1110 | movq_cfi rcx, RCX+8 |
1110 | CFI_MOVQ rax, RAX+8 | 1111 | movq_cfi rax, RAX+8 |
1111 | CFI_MOVQ r8, R8+8 | 1112 | movq_cfi r8, R8+8 |
1112 | CFI_MOVQ r9, R9+8 | 1113 | movq_cfi r9, R9+8 |
1113 | CFI_MOVQ r10, R10+8 | 1114 | movq_cfi r10, R10+8 |
1114 | CFI_MOVQ r11, R11+8 | 1115 | movq_cfi r11, R11+8 |
1115 | CFI_MOVQ rbx, RBX+8 | 1116 | movq_cfi rbx, RBX+8 |
1116 | CFI_MOVQ rbp, RBP+8 | 1117 | movq_cfi rbp, RBP+8 |
1117 | CFI_MOVQ r12, R12+8 | 1118 | movq_cfi r12, R12+8 |
1118 | CFI_MOVQ r13, R13+8 | 1119 | movq_cfi r13, R13+8 |
1119 | CFI_MOVQ r14, R14+8 | 1120 | movq_cfi r14, R14+8 |
1120 | CFI_MOVQ r15, R15+8 | 1121 | movq_cfi r15, R15+8 |
1121 | xorl %ebx,%ebx | 1122 | xorl %ebx,%ebx |
1122 | testl $3,CS+8(%rsp) | 1123 | testl $3,CS+8(%rsp) |
1123 | je error_kernelspace | 1124 | je error_kernelspace |
@@ -1515,9 +1516,9 @@ ENTRY(xen_failsafe_callback) | |||
1515 | CFI_RESTORE r11 | 1516 | CFI_RESTORE r11 |
1516 | addq $0x30,%rsp | 1517 | addq $0x30,%rsp |
1517 | CFI_ADJUST_CFA_OFFSET -0x30 | 1518 | CFI_ADJUST_CFA_OFFSET -0x30 |
1518 | CFI_PUSHQ $0 /* RIP */ | 1519 | pushq_cfi $0 /* RIP */ |
1519 | CFI_PUSHQ %r11 | 1520 | pushq_cfi %r11 |
1520 | CFI_PUSHQ %rcx | 1521 | pushq_cfi %rcx |
1521 | jmp general_protection | 1522 | jmp general_protection |
1522 | CFI_RESTORE_STATE | 1523 | CFI_RESTORE_STATE |
1523 | 1: /* Segment mismatch => Category 1 (Bad segment). Retry the IRET. */ | 1524 | 1: /* Segment mismatch => Category 1 (Bad segment). Retry the IRET. */ |
@@ -1527,7 +1528,7 @@ ENTRY(xen_failsafe_callback) | |||
1527 | CFI_RESTORE r11 | 1528 | CFI_RESTORE r11 |
1528 | addq $0x30,%rsp | 1529 | addq $0x30,%rsp |
1529 | CFI_ADJUST_CFA_OFFSET -0x30 | 1530 | CFI_ADJUST_CFA_OFFSET -0x30 |
1530 | CFI_PUSHQ $0 | 1531 | pushq_cfi $0 |
1531 | SAVE_ALL | 1532 | SAVE_ALL |
1532 | jmp error_exit | 1533 | jmp error_exit |
1533 | CFI_ENDPROC | 1534 | CFI_ENDPROC |