diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-02 12:05:44 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-02 12:08:25 -0400 |
commit | 1d72d9f83df057e71c7951def41138a0230bf737 (patch) | |
tree | 32e1d5b7bb3f906faa7b62bbb53a91209d73024c /arch/frv | |
parent | 7b7ade117951dcc5ec947595ea7ff622fa56895e (diff) |
frv: fix the broken preempt
Just get %icc2 into the state we would have after local_irq_disable()
and physical IRQ having happened since then. Then we can simply
use preempt_schedule_irq() and be done with the whole mess.
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/kernel/entry.S | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index b1cd7e8145bb..dfcd263c0517 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -1075,27 +1075,10 @@ __entry_return_from_kernel_interrupt: | |||
1075 | subicc gr5,#0,gr0,icc0 | 1075 | subicc gr5,#0,gr0,icc0 |
1076 | beq icc0,#0,__entry_return_direct | 1076 | beq icc0,#0,__entry_return_direct |
1077 | 1077 | ||
1078 | __entry_preempt_need_resched: | 1078 | subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ |
1079 | ldi @(gr15,#TI_FLAGS),gr4 | 1079 | call preempt_schedule_irq |
1080 | andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 | ||
1081 | beq icc0,#1,__entry_return_direct | ||
1082 | |||
1083 | setlos #PREEMPT_ACTIVE,gr5 | ||
1084 | sti gr5,@(gr15,#TI_PRE_COUNT) | ||
1085 | |||
1086 | andi gr23,#~PSR_PIL,gr23 | ||
1087 | movgs gr23,psr | ||
1088 | |||
1089 | call schedule | ||
1090 | sti gr0,@(gr15,#TI_PRE_COUNT) | ||
1091 | |||
1092 | movsg psr,gr23 | ||
1093 | ori gr23,#PSR_PIL_14,gr23 | ||
1094 | movgs gr23,psr | ||
1095 | bra __entry_preempt_need_resched | ||
1096 | #else | ||
1097 | bra __entry_return_direct | ||
1098 | #endif | 1080 | #endif |
1081 | bra __entry_return_direct | ||
1099 | 1082 | ||
1100 | 1083 | ||
1101 | ############################################################################### | 1084 | ############################################################################### |