Merge tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmi
[linux-2.6-microblaze.git] / arch / arm / kernel / entry-common.S
index 7f0b7ab..d9c99db 100644 (file)
@@ -49,10 +49,6 @@ __ret_fast_syscall:
  UNWIND(.fnstart       )
  UNWIND(.cantunwind    )
        disable_irq_notrace                     @ disable interrupts
-       ldr     r2, [tsk, #TI_ADDR_LIMIT]
-       ldr     r1, =TASK_SIZE
-       cmp     r2, r1
-       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]            @ re-check for syscall tracing
        movs    r1, r1, lsl #16
        bne     fast_work_pending
@@ -87,10 +83,6 @@ __ret_fast_syscall:
        bl      do_rseq_syscall
 #endif
        disable_irq_notrace                     @ disable interrupts
-       ldr     r2, [tsk, #TI_ADDR_LIMIT]
-       ldr     r1, =TASK_SIZE
-       cmp     r2, r1
-       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]            @ re-check for syscall tracing
        movs    r1, r1, lsl #16
        beq     no_work_pending
@@ -129,10 +121,6 @@ ret_slow_syscall:
 #endif
        disable_irq_notrace                     @ disable interrupts
 ENTRY(ret_to_user_from_irq)
-       ldr     r2, [tsk, #TI_ADDR_LIMIT]
-       ldr     r1, =TASK_SIZE
-       cmp     r2, r1
-       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]
        movs    r1, r1, lsl #16
        bne     slow_work_pending
@@ -226,6 +214,7 @@ ENTRY(vector_swi)
        /* saved_psr and saved_pc are now dead */
 
        uaccess_disable tbl
+       get_thread_info tsk
 
        adr     tbl, sys_call_table             @ load syscall table pointer
 
@@ -237,13 +226,17 @@ ENTRY(vector_swi)
         * get the old ABI syscall table address.
         */
        bics    r10, r10, #0xff000000
+       strne   r10, [tsk, #TI_ABI_SYSCALL]
+       streq   scno, [tsk, #TI_ABI_SYSCALL]
        eorne   scno, r10, #__NR_OABI_SYSCALL_BASE
        ldrne   tbl, =sys_oabi_call_table
 #elif !defined(CONFIG_AEABI)
        bic     scno, scno, #0xff000000         @ mask off SWI op-code
+       str     scno, [tsk, #TI_ABI_SYSCALL]
        eor     scno, scno, #__NR_SYSCALL_BASE  @ check OS number
+#else
+       str     scno, [tsk, #TI_ABI_SYSCALL]
 #endif
-       get_thread_info tsk
        /*
         * Reload the registers that may have been corrupted on entry to
         * the syscall assembly (by tracing or context tracking.)
@@ -288,7 +281,6 @@ ENDPROC(vector_swi)
         * context switches, and waiting for our parent to respond.
         */
 __sys_trace:
-       mov     r1, scno
        add     r0, sp, #S_OFF
        bl      syscall_trace_enter
        mov     scno, r0