aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/entry_32.S
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-12-09 19:01:51 -0500
committerH. Peter Anvin <hpa@zytor.com>2009-12-09 19:27:49 -0500
commite258e4e0b495e6ecbd073d6bef1eafb62a58919a (patch)
tree424330b7351c6e611a329b997704f3815a479d3f /arch/x86/kernel/entry_32.S
parent2588465badb648a50cd19623f0dd0063c90d4e31 (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.S49
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; \
730ptregs_##name: \ 730ptregs_##name: \
731 leal 4(%esp),%eax; \ 731 leal 4(%esp),%eax; \
732 jmp sys_##name; 732 jmp sys_##name;
733 733
734PTREGSCALL(iopl) 734#define PTREGSCALL1(name) \
735PTREGSCALL(fork) 735 ALIGN; \
736PTREGSCALL(clone) 736ptregs_##name: \
737PTREGSCALL(vfork) 737 leal 4(%esp),%edx; \
738PTREGSCALL(execve) 738 movl PT_EBX(%edx),%eax; \
739PTREGSCALL(sigaltstack) 739 jmp sys_##name;
740PTREGSCALL(sigreturn) 740
741PTREGSCALL(rt_sigreturn) 741#define PTREGSCALL2(name) \
742PTREGSCALL(vm86) 742 ALIGN; \
743PTREGSCALL(vm86old) 743ptregs_##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; \
751ptregs_##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
761PTREGSCALL0(iopl)
762PTREGSCALL0(fork)
763PTREGSCALL0(clone)
764PTREGSCALL0(vfork)
765PTREGSCALL0(execve)
766PTREGSCALL0(sigaltstack)
767PTREGSCALL0(sigreturn)
768PTREGSCALL0(rt_sigreturn)
769PTREGSCALL0(vm86)
770PTREGSCALL0(vm86old)
744 771
745.macro FIXUP_ESPFIX_STACK 772.macro FIXUP_ESPFIX_STACK
746/* 773/*