diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-26 01:07:39 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-01 09:58:15 -0400 |
| commit | 969ae0bfb079de892a95aa4ca1e8ac76c4beb57c (patch) | |
| tree | 78f82c9573857f939f9c1caaac07ef455d20de27 /arch/x86 | |
| parent | fe9d7feab567085112ca02b238c839ca1b4cd9c5 (diff) | |
x86: get rid of duplicate code in case of CONFIG_VM86
no need to have the call of do_notify_resume() + checks around it
duplicated for vm86 case - a bit of rearranging of ifdefs and we'll
have a perfectly fine copy to jump back to.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86')
| -rw-r--r-- | arch/x86/kernel/entry_32.S | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index b6bb69239296..fe4cc305d8da 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
| @@ -618,6 +618,10 @@ work_notifysig: # deal with pending signals and | |||
| 618 | movl %esp, %eax | 618 | movl %esp, %eax |
| 619 | jne work_notifysig_v86 # returning to kernel-space or | 619 | jne work_notifysig_v86 # returning to kernel-space or |
| 620 | # vm86-space | 620 | # vm86-space |
| 621 | 1: | ||
| 622 | #else | ||
| 623 | movl %esp, %eax | ||
| 624 | #endif | ||
| 621 | TRACE_IRQS_ON | 625 | TRACE_IRQS_ON |
| 622 | ENABLE_INTERRUPTS(CLBR_NONE) | 626 | ENABLE_INTERRUPTS(CLBR_NONE) |
| 623 | movb PT_CS(%esp), %bl | 627 | movb PT_CS(%esp), %bl |
| @@ -628,24 +632,15 @@ work_notifysig: # deal with pending signals and | |||
| 628 | call do_notify_resume | 632 | call do_notify_resume |
| 629 | jmp resume_userspace | 633 | jmp resume_userspace |
| 630 | 634 | ||
| 635 | #ifdef CONFIG_VM86 | ||
| 631 | ALIGN | 636 | ALIGN |
| 632 | work_notifysig_v86: | 637 | work_notifysig_v86: |
| 633 | pushl_cfi %ecx # save ti_flags for do_notify_resume | 638 | pushl_cfi %ecx # save ti_flags for do_notify_resume |
| 634 | call save_v86_state # %eax contains pt_regs pointer | 639 | call save_v86_state # %eax contains pt_regs pointer |
| 635 | popl_cfi %ecx | 640 | popl_cfi %ecx |
| 636 | movl %eax, %esp | 641 | movl %eax, %esp |
| 637 | #else | 642 | jmp 1b |
| 638 | movl %esp, %eax | ||
| 639 | #endif | 643 | #endif |
| 640 | TRACE_IRQS_ON | ||
| 641 | ENABLE_INTERRUPTS(CLBR_NONE) | ||
| 642 | movb PT_CS(%esp), %bl | ||
| 643 | andb $SEGMENT_RPL_MASK, %bl | ||
| 644 | cmpb $USER_RPL, %bl | ||
| 645 | jb resume_kernel | ||
| 646 | xorl %edx, %edx | ||
| 647 | call do_notify_resume | ||
| 648 | jmp resume_userspace | ||
| 649 | END(work_pending) | 644 | END(work_pending) |
| 650 | 645 | ||
| 651 | # perform syscall exit tracing | 646 | # perform syscall exit tracing |
