Linux MIPS Architecture development
 help / color / mirror / Atom feed
* 2.6.11 preemption fix
@ 2005-03-04 10:43 Atsushi Nemoto
  2005-03-04 12:36 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2005-03-04 10:43 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.11 preemption fix
  2005-03-04 10:43 2.6.11 preemption fix Atsushi Nemoto
@ 2005-03-04 12:36 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2005-03-04 12:36 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips

On Fri, Mar 04, 2005 at 07:43:41PM +0900, Atsushi Nemoto wrote:

> 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?

Looking good. Applied,

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-04 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04 10:43 2.6.11 preemption fix Atsushi Nemoto
2005-03-04 12:36 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox