diff options
author | Priyanka Jain <Priyanka.Jain@freescale.com> | 2013-05-22 09:26:09 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-05-24 20:30:26 (GMT) |
commit | d623c831386eadb04bf7eb005edcacc7bcc0a50f (patch) | |
tree | 0a72516a5eda4ef896425f6d343364b5f28b13c2 /arch/powerpc | |
parent | 313b229e8408280d0bf8b89e662699b049168731 (diff) | |
download | linux-fsl-qoriq-d623c831386eadb04bf7eb005edcacc7bcc0a50f.tar.xz |
powerpc/32bit,PREEMPT:Load TI_FLAGS to check NEED_RESCHED
Add instruction to load TI_FLAGS in r8
While returning from exception handling in case of PREEMPT enabled,
_TIF_NEED_RESCHED bit is checked in TI_FLAGS (thread_info flag) of current
task. Only if this bit is set, it should continue with the process of
calling preempt_schedule_irq() to schedule highest priority task if
available.
Current code assumes that r8 contains TI_FLAGS and check this for
_TIF_NEED_RESCHED, but as r8 is modified in the code which executes before
this check, r8 no longer contains the expected TI_FLAGS information.
As a result check for comparison with _TIF_NEED_RESCHED was failing even if
NEED_RESCHED bit is set in the current thread_info flag. Due to this,
preempt_schedule_irq() and in turn scheduler was not getting called even if
highest priority task is ready for execution leading to increase in
latency issue.
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Change-Id: Ibc2c94ba9031488fc1e8e2ceae864dcea171ceae
Reviewed-on: http://git.am.freescale.net:8181/2645
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 95b884e..77b52c7 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -889,6 +889,7 @@ resume_kernel: #ifdef CONFIG_PREEMPT /* check current_thread_info->preempt_count */ lwz r0,TI_PREEMPT(r9) + lwz r8,TI_FLAGS(r9) cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ bne restore andi. r8,r8,_TIF_NEED_RESCHED |