]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
FRV: Fix the preemption handling
authorDavid Howells <dhowells@redhat.com>
Fri, 2 Nov 2012 13:20:42 +0000 (13:20 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 2 Nov 2012 13:20:42 +0000 (13:20 +0000)
Fix the preemption handling in FRV code where the PREEMPT_ACTIVE value is
incorrectly loaded into the threadinfo flags rather than the threadinfo
preemption count.

Unfortunately, the code cannot be simply converted to use
preempt_schedule_irq() as is because FRV uses virtual interrupt disablement to
cut down on the cost of actually disabling interrupts and thus
local_irq_enable() doesn't actually enable interrupts.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Al Viro <viro@ZenIV.linux.org.uk>

arch/frv/kernel/entry.S

index ee0beb354e4df38e0c067410e8f9643deec2856f..d64c5262796136ba684f9640a96e6e1b86ef90df 100644 (file)
@@ -1086,7 +1086,7 @@ __entry_preempt_need_resched:
        beq             icc0,#1,__entry_return_direct
 
        setlos          #PREEMPT_ACTIVE,gr5
-       sti             gr5,@(gr15,#TI_FLAGS)
+       sti             gr5,@(gr15,#TI_PRE_COUNT)
 
        andi            gr23,#~PSR_PIL,gr23
        movgs           gr23,psr