diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-02-11 16:43:58 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-02-11 17:00:56 -0500 |
commit | b12bdaf11f935d7be030207e3c77faeaeab8ded3 (patch) | |
tree | e41f325f01614f7cf2eb78350fbd7440afe39cf8 /arch/x86/kernel/ioport.c | |
parent | 1c0040047d5499599cc231ca3f105be3ceff8562 (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index 7ec148646312..e41980a373ab 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) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | #ifdef CONFIG_X86_32 | 133 | #ifdef CONFIG_X86_32 |
134 | ptregscall long sys_iopl(struct pt_regs *regs, unsigned int level) | 134 | long sys_iopl(struct pt_regs *regs) |
135 | { | 135 | { |
136 | unsigned int level = regs->bx; | ||
136 | struct thread_struct *t = ¤t->thread; | 137 | struct thread_struct *t = ¤t->thread; |
137 | int rc; | 138 | int rc; |
138 | 139 | ||