linux-mips
[Top] [All Lists]

2.6.11 preemption fix

To: linux-mips@linux-mips.org
Subject: 2.6.11 preemption fix
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 04 Mar 2005 19:43:41 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
It seems 2.6.11 preemption kernel is broken.

The preempt_schedule_irq() expects preempt_count is 0.  Also trailing
branch instructino have been lost.  How about this fix?

--- linux-mips/arch/mips/kernel/entry.S 2005-02-10 11:27:50.000000000 +0900
+++ linux/arch/mips/kernel/entry.S      2005-03-04 17:09:53.000000000 +0900
@@ -58,9 +58,8 @@
        LONG_L  t0, PT_STATUS(sp)               # Interrupts off?
        andi    t0, 1
        beqz    t0, restore_all
-       li      t0, PREEMPT_ACTIVE
-       sw      t0, TI_PRE_COUNT($28)
        jal     preempt_schedule_irq
+       b       need_resched
 #endif
 
 FEXPORT(ret_from_fork)

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>