Remove unused arguments from preempt_{start,stop}/local_irq_{en,dis}able.
Don't clobber the preloaded TI_FLAGS in a2 needlessly. Unexport local functions. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
69903d6500
commit
c264852726
|
@ -19,11 +19,11 @@
|
||||||
#include <asm/war.h>
|
#include <asm/war.h>
|
||||||
|
|
||||||
#ifdef CONFIG_PREEMPT
|
#ifdef CONFIG_PREEMPT
|
||||||
.macro preempt_stop reg=t0
|
.macro preempt_stop
|
||||||
.endm
|
.endm
|
||||||
#else
|
#else
|
||||||
.macro preempt_stop reg=t0
|
.macro preempt_stop
|
||||||
local_irq_disable \reg
|
local_irq_disable
|
||||||
.endm
|
.endm
|
||||||
#define resume_kernel restore_all
|
#define resume_kernel restore_all
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,17 +37,17 @@ FEXPORT(ret_from_irq)
|
||||||
andi t0, t0, KU_USER
|
andi t0, t0, KU_USER
|
||||||
beqz t0, resume_kernel
|
beqz t0, resume_kernel
|
||||||
|
|
||||||
FEXPORT(resume_userspace)
|
resume_userspace:
|
||||||
local_irq_disable t0 # make sure we dont miss an
|
local_irq_disable # make sure we dont miss an
|
||||||
# interrupt setting need_resched
|
# interrupt setting need_resched
|
||||||
# between sampling and return
|
# between sampling and return
|
||||||
LONG_L a2, TI_FLAGS($28) # current->work
|
LONG_L a2, TI_FLAGS($28) # current->work
|
||||||
andi a2, _TIF_WORK_MASK # (ignoring syscall_trace)
|
andi t0, a2, _TIF_WORK_MASK # (ignoring syscall_trace)
|
||||||
bnez a2, work_pending
|
bnez t0, work_pending
|
||||||
j restore_all
|
j restore_all
|
||||||
|
|
||||||
#ifdef CONFIG_PREEMPT
|
#ifdef CONFIG_PREEMPT
|
||||||
ENTRY(resume_kernel)
|
resume_kernel:
|
||||||
lw t0, TI_PRE_COUNT($28)
|
lw t0, TI_PRE_COUNT($28)
|
||||||
bnez t0, restore_all
|
bnez t0, restore_all
|
||||||
need_resched:
|
need_resched:
|
||||||
|
@ -59,10 +59,10 @@ need_resched:
|
||||||
beqz t0, restore_all
|
beqz t0, restore_all
|
||||||
li t0, PREEMPT_ACTIVE
|
li t0, PREEMPT_ACTIVE
|
||||||
sw t0, TI_PRE_COUNT($28)
|
sw t0, TI_PRE_COUNT($28)
|
||||||
local_irq_enable t0
|
local_irq_enable
|
||||||
jal schedule
|
jal schedule
|
||||||
sw zero, TI_PRE_COUNT($28)
|
sw zero, TI_PRE_COUNT($28)
|
||||||
local_irq_disable t0
|
local_irq_disable
|
||||||
b need_resched
|
b need_resched
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -88,13 +88,13 @@ FEXPORT(restore_partial) # restore partial frame
|
||||||
RESTORE_SP_AND_RET
|
RESTORE_SP_AND_RET
|
||||||
.set at
|
.set at
|
||||||
|
|
||||||
FEXPORT(work_pending)
|
work_pending:
|
||||||
andi t0, a2, _TIF_NEED_RESCHED
|
andi t0, a2, _TIF_NEED_RESCHED # a2 is preloaded with TI_FLAGS
|
||||||
beqz t0, work_notifysig
|
beqz t0, work_notifysig
|
||||||
work_resched:
|
work_resched:
|
||||||
jal schedule
|
jal schedule
|
||||||
|
|
||||||
local_irq_disable t0 # make sure need_resched and
|
local_irq_disable # make sure need_resched and
|
||||||
# signals dont change between
|
# signals dont change between
|
||||||
# sampling and return
|
# sampling and return
|
||||||
LONG_L a2, TI_FLAGS($28)
|
LONG_L a2, TI_FLAGS($28)
|
||||||
|
@ -113,11 +113,10 @@ work_notifysig: # deal with pending signals and
|
||||||
|
|
||||||
FEXPORT(syscall_exit_work_partial)
|
FEXPORT(syscall_exit_work_partial)
|
||||||
SAVE_STATIC
|
SAVE_STATIC
|
||||||
FEXPORT(syscall_exit_work)
|
syscall_exit_work:
|
||||||
LONG_L t0, TI_FLAGS($28)
|
li t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
|
||||||
li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
|
and t0, a2 # a2 is preloaded with TI_FLAGS
|
||||||
and t0, t1
|
beqz t0, work_pending # trace bit set?
|
||||||
beqz t0, work_pending # trace bit is set
|
|
||||||
local_irq_enable # could let do_syscall_trace()
|
local_irq_enable # could let do_syscall_trace()
|
||||||
# call schedule() instead
|
# call schedule() instead
|
||||||
move a0, sp
|
move a0, sp
|
||||||
|
|
Loading…
Reference in New Issue