x86: kill pt_regs argument of do_notify_resume()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 35e67a4..d8ff007 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -30,7 +30,6 @@
#endif /* __ASSEMBLY__ */
#include <uapi/asm/signal.h>
#ifndef __ASSEMBLY__
-extern void do_notify_resume(struct pt_regs *, void *, __u32);
#define __ARCH_HAS_SA_RESTORER
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 8f3e2de..2dd59af 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -640,7 +640,7 @@
andb $SEGMENT_RPL_MASK, %bl
cmpb $USER_RPL, %bl
jb resume_kernel
- xorl %edx, %edx
+ movl %ecx, %edx
call do_notify_resume
jmp resume_userspace
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index c1d01e6..82a5f02 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -817,7 +817,7 @@
testl $_TIF_DO_NOTIFY_MASK,%edx
jz 1f
movq %rsp,%rdi # &ptregs -> arg1
- xorl %esi,%esi # oldset -> arg2
+ movl %edx,%esi # thread_flags -> arg2
call do_notify_resume
1: movl $_TIF_WORK_MASK,%edi
int_restore_rest:
@@ -1105,7 +1105,7 @@
ENABLE_INTERRUPTS(CLBR_NONE)
SAVE_REST
movq $-1,ORIG_RAX(%rsp)
- xorl %esi,%esi # oldset
+ movl %edx,%esi # thread_flags
movq %rsp,%rdi # &pt_regs
call do_notify_resume
RESTORE_REST
@@ -1519,10 +1519,9 @@
movq %rax,%rsp /* switch stack for scheduling */
testl $_TIF_NEED_RESCHED,%ebx
jnz paranoid_schedule
- movl %ebx,%edx /* arg3: thread flags */
+ movl %ebx,%esi /* arg2: thread flags */
TRACE_IRQS_ON
ENABLE_INTERRUPTS(CLBR_NONE)
- xorl %esi,%esi /* arg2: oldset */
movq %rsp,%rdi /* arg1: &pt_regs */
call do_notify_resume
DISABLE_INTERRUPTS(CLBR_NONE)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 6956299..db55b7f 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -733,7 +733,7 @@
* - triggered by the TIF_WORK_MASK flags
*/
void
-do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
+do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags)
{
user_exit();