Commit f84aa284 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/interrupt: Rename and lightly change syscall_exit_prepare_main()

Rename syscall_exit_prepare_main() into interrupt_exit_prepare_main()

Pass it the 'ret' so that it can 'or' it directly instead of
oring twice, once inside the function and once outside.

And remove 'r3' parameter which is not used.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
[np: split out some changes into other patches]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210617155116.2167984-14-npiggin@gmail.com
parent 13799748
...@@ -243,11 +243,10 @@ static notrace void booke_load_dbcr0(void) ...@@ -243,11 +243,10 @@ static notrace void booke_load_dbcr0(void)
#endif #endif
} }
static notrace unsigned long syscall_exit_prepare_main(unsigned long r3, static notrace unsigned long
struct pt_regs *regs) interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs)
{ {
unsigned long ti_flags; unsigned long ti_flags;
unsigned long ret = 0;
again: again:
ti_flags = READ_ONCE(current_thread_info()->flags); ti_flags = READ_ONCE(current_thread_info()->flags);
...@@ -365,7 +364,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3, ...@@ -365,7 +364,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
} }
local_irq_disable(); local_irq_disable();
ret |= syscall_exit_prepare_main(r3, regs); ret = interrupt_exit_user_prepare_main(ret, regs);
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
regs->exit_result = ret; regs->exit_result = ret;
...@@ -397,7 +396,7 @@ notrace unsigned long syscall_exit_restart(unsigned long r3, struct pt_regs *reg ...@@ -397,7 +396,7 @@ notrace unsigned long syscall_exit_restart(unsigned long r3, struct pt_regs *reg
BUG_ON(!user_mode(regs)); BUG_ON(!user_mode(regs));
regs->exit_result |= syscall_exit_prepare_main(r3, regs); regs->exit_result = interrupt_exit_user_prepare_main(regs->exit_result, regs);
return regs->exit_result; return regs->exit_result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment