diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-12-09 19:01:51 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-09 19:27:49 -0500 |
commit | e258e4e0b495e6ecbd073d6bef1eafb62a58919a (patch) | |
tree | 424330b7351c6e611a329b997704f3815a479d3f /arch/x86/kernel/entry_32.S | |
parent | 2588465badb648a50cd19623f0dd0063c90d4e31 (diff) |
x86-32: Add new pt_regs stubs
Add new stubs which add the pt_regs pointer as the last arg, matching
64-bit. This will allow these syscalls to be easily merged.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1260403316-5679-2-git-send-email-brgerst@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
-rw-r--r-- | arch/x86/kernel/entry_32.S | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 50b9c220e121..34dbfa909dd7 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -725,22 +725,49 @@ END(syscall_badsys) | |||
725 | /* | 725 | /* |
726 | * System calls that need a pt_regs pointer. | 726 | * System calls that need a pt_regs pointer. |
727 | */ | 727 | */ |
728 | #define PTREGSCALL(name) \ | 728 | #define PTREGSCALL0(name) \ |
729 | ALIGN; \ | 729 | ALIGN; \ |
730 | ptregs_##name: \ | 730 | ptregs_##name: \ |
731 | leal 4(%esp),%eax; \ | 731 | leal 4(%esp),%eax; \ |
732 | jmp sys_##name; | 732 | jmp sys_##name; |
733 | 733 | ||
734 | PTREGSCALL(iopl) | 734 | #define PTREGSCALL1(name) \ |
735 | PTREGSCALL(fork) | 735 | ALIGN; \ |
736 | PTREGSCALL(clone) | 736 | ptregs_##name: \ |
737 | PTREGSCALL(vfork) | 737 | leal 4(%esp),%edx; \ |
738 | PTREGSCALL(execve) | 738 | movl PT_EBX(%edx),%eax; \ |
739 | PTREGSCALL(sigaltstack) | 739 | jmp sys_##name; |
740 | PTREGSCALL(sigreturn) | 740 | |
741 | PTREGSCALL(rt_sigreturn) | 741 | #define PTREGSCALL2(name) \ |
742 | PTREGSCALL(vm86) | 742 | ALIGN; \ |
743 | PTREGSCALL(vm86old) | 743 | ptregs_##name: \ |
744 | leal 4(%esp),%ecx; \ | ||
745 | movl PT_ECX(%ecx),%edx; \ | ||
746 | movl PT_EBX(%ecx),%eax; \ | ||
747 | jmp sys_##name; | ||
748 | |||
749 | #define PTREGSCALL3(name) \ | ||
750 | ALIGN; \ | ||
751 | ptregs_##name: \ | ||
752 | leal 4(%esp),%eax; \ | ||
753 | pushl %eax; \ | ||
754 | movl PT_EDX(%eax),%ecx; \ | ||
755 | movl PT_ECX(%eax),%edx; \ | ||
756 | movl PT_EBX(%eax),%eax; \ | ||
757 | call sys_##name; \ | ||
758 | addl $4,%esp; \ | ||
759 | ret | ||
760 | |||
761 | PTREGSCALL0(iopl) | ||
762 | PTREGSCALL0(fork) | ||
763 | PTREGSCALL0(clone) | ||
764 | PTREGSCALL0(vfork) | ||
765 | PTREGSCALL0(execve) | ||
766 | PTREGSCALL0(sigaltstack) | ||
767 | PTREGSCALL0(sigreturn) | ||
768 | PTREGSCALL0(rt_sigreturn) | ||
769 | PTREGSCALL0(vm86) | ||
770 | PTREGSCALL0(vm86old) | ||
744 | 771 | ||
745 | .macro FIXUP_ESPFIX_STACK | 772 | .macro FIXUP_ESPFIX_STACK |
746 | /* | 773 | /* |