#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
/*
- * Does a 32-bit syscall. Called with IRQs off and does all entry and
- * exit work.
+ * Does a 32-bit syscall. Called with IRQs on and does all entry and
+ * exit work and returns with IRQs off.
*/
-__visible void do_int80_syscall_32(struct pt_regs *regs)
+static void do_syscall_32_irqs_on(struct pt_regs *regs)
{
struct thread_info *ti = pt_regs_to_thread_info(regs);
unsigned int nr = (unsigned int)regs->orig_ax;
ti->status |= TS_COMPAT;
#endif
- local_irq_enable();
-
if (READ_ONCE(ti->flags) & _TIF_WORK_SYSCALL_ENTRY) {
/*
* Subtlety here: if ptrace pokes something larger than
syscall_return_slowpath(regs);
}
+/* Handles int $0x80 */
+__visible void do_int80_syscall_32(struct pt_regs *regs)
+{
+ local_irq_enable();
+ do_syscall_32_irqs_on(regs);
+}
+
/* Returns 0 to return using IRET or 1 to return using SYSEXIT/SYSRETL. */
__visible long do_fast_syscall_32(struct pt_regs *regs)
{
prepare_exit_to_usermode(regs);
return 0; /* Keep it simple: use IRET. */
}
- local_irq_disable();
/* Now this is just like a normal syscall. */
- do_int80_syscall_32(regs);
+ do_syscall_32_irqs_on(regs);
#ifdef CONFIG_X86_64
/*