[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] [PATCH] return from interrupt.



Hi Kenneth,


Kenneth Johansson wrote:
It was possible to get a process stuck in an infinite loop on the rfid
instruction.
The problem was that it was possible to get an interrupt during context
restore and when that happened after R14 was restored it resulted in an
infinite loop that gradually shrink down to include just the rfid
instruction.

That's funny timing, I made exactly the same patch to my tree yesterday while I was chasing a related bug! It will be in the next release.

Thanks,

John



Index: linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
===================================================================
--- linux-2.6.x-petalogix.orig/arch/microblaze/kernel/entry.S   2007-11-12 11:42:12.000000000 +0100
+++ linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S        2007-11-12 11:43:44.000000000 +0100
@@ -143,7 +143,11 @@
 no_intr_reshed:
        /* save mode indicator */
        lwi     r11, r1, PT_MODE
-3: +3:
+       /* Must protect the restore against interrupts              */
+       /* schedule uses spin_lock_irq() and spin_unlock_irq()      */
+       /* and even if schedule is not visited interrupts can be on */
+ disable_irq swi r11, r0, PER_CPU(KM) /* save r31 */


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/