diff mbox series

[v4,13/17] powerpc/interrupt: Rename and lightly change syscall_exit_prepare_main()

Message ID 20210617155116.2167984-14-npiggin@gmail.com (mailing list archive)
State Accepted
Headers show
Series powerpc/64: fast interrupt exits | expand
Related show

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/merge (77fe1f3ccbe0cdc6f386aef522b043c52196d4d2)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/next (07d8ad6fd8a3d47f50595ca4826f41dbf4f3a0c6)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch linus/master (70585216fe7730d9fb5453d3e2804e149d0fe201)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/fixes (478036c4cd1a16e613a2f883d79c03cf187faacb)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch linux-next (70585216fe7730d9fb5453d3e2804e149d0fe201)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Nicholas Piggin June 17, 2021, 3:51 p.m. UTC
From: Christophe Leroy <christophe.leroy@csgroup.eu>

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: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[np: split out some changes into other patches]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/interrupt.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index 6dc9b7536511..5bfdf8f9b130 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -243,11 +243,10 @@  static notrace void booke_load_dbcr0(void)
 #endif
 }
 
-static notrace unsigned long syscall_exit_prepare_main(unsigned long r3,
-						       struct pt_regs *regs)
+static notrace unsigned long
+interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs)
 {
 	unsigned long ti_flags;
-	unsigned long ret = 0;
 
 again:
 	ti_flags = READ_ONCE(current_thread_info()->flags);
@@ -365,7 +364,7 @@  notrace unsigned long syscall_exit_prepare(unsigned long r3,
 	}
 
 	local_irq_disable();
-	ret |= syscall_exit_prepare_main(r3, regs);
+	ret = interrupt_exit_user_prepare_main(ret, regs);
 
 #ifdef CONFIG_PPC64
 	regs->exit_result = ret;
@@ -397,7 +396,7 @@  notrace unsigned long syscall_exit_restart(unsigned long r3, struct pt_regs *reg
 
 	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;
 }