summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ioport.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-02-11 16:43:58 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-11 14:00:56 -0800
commitb12bdaf11f935d7be030207e3c77faeaeab8ded3 (patch)
treee41f325f01614f7cf2eb78350fbd7440afe39cf8 /arch/x86/kernel/ioport.c
parent1c0040047d5499599cc231ca3f105be3ceff8562 (diff)
x86: use regparm(3) for passed-in pt_regs pointer
Some syscalls need to access the pt_regs structure, either to copy user register state or to modifiy it. This patch adds stubs to load the address of the pt_regs struct into the %eax register, and changes the syscalls to take the pointer as an argument instead of relying on the assumption that the pt_regs structure overlaps the function arguments. Drop the use of regparm(1) due to concern about gcc bugs, and to move in the direction of the eventual removal of regparm(0) for asmlinkage. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/ioport.c')
-rw-r--r--arch/x86/kernel/ioport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index 7ec14864631..e41980a373a 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -131,8 +131,9 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
}
#ifdef CONFIG_X86_32
-ptregscall long sys_iopl(struct pt_regs *regs, unsigned int level)
+long sys_iopl(struct pt_regs *regs)
{
+ unsigned int level = regs->bx;
struct thread_struct *t = &current->thread;
int rc;