Commit ae58b1c6 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/interrupt: Remove prep_irq_for_user_exit()



prep_irq_for_user_exit() has only one caller, squash it
inside that caller.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210617155116.2167984-18-npiggin@gmail.com
parent 61eece2d
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -75,18 +75,6 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable)
	return true;
}

static notrace __always_inline bool prep_irq_for_user_exit(void)
{
	bool ret;

	user_enter_irqoff();
	ret = prep_irq_for_enabled_exit(true);
	if (!ret)
		user_exit_irqoff();

	return ret;
}

/* Has to run notrace because it is entered not completely "reconciled" */
notrace long system_call_exception(long r3, long r4, long r5,
				   long r6, long r7, long r8,
@@ -276,7 +264,9 @@ interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs)
		}
	}

	if (!prep_irq_for_user_exit()) {
	user_enter_irqoff();
	if (!prep_irq_for_enabled_exit(true)) {
		user_exit_irqoff();
		local_irq_enable();
		local_irq_disable();
		goto again;