* [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU
@ 2005-12-20 5:32 Maxime Bizon
2005-12-20 12:00 ` Maciej W. Rozycki
2005-12-22 1:48 ` Ralf Baechle
0 siblings, 2 replies; 3+ messages in thread
From: Maxime Bizon @ 2005-12-20 5:32 UTC (permalink / raw)
To: linux-mips
Hello all,
I was unable to get my R4KECr2 board working with CONFIG_CPU_MIPSR2 &
CONFIG_IRQ_CPU, irq delivery is not working.
local_irq_restore() logic is to check that "flags" is non zero, and
enable irq accordingly.
But "flags" comes directly from di, which according to mips instruction
set, saves whole status content, not just IE bit.
Attached patch to fix this.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
--- linux.git/include/asm-mips/interrupt.h.old 2005-12-20 06:20:44.000000000 +0100
+++ linux.git/include/asm-mips/interrupt.h 2005-12-20 06:21:02.000000000 +0100
@@ -93,6 +93,7 @@
" .set noat \n"
#ifdef CONFIG_CPU_MIPSR2
" di \\result \n"
+ " andi \\result, 1 \n"
#else
" mfc0 \\result, $12 \n"
" ori $1, \\result, 1 \n"
Thanks,
--
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU
2005-12-20 5:32 [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU Maxime Bizon
@ 2005-12-20 12:00 ` Maciej W. Rozycki
2005-12-22 1:48 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2005-12-20 12:00 UTC (permalink / raw)
To: Maxime Bizon; +Cc: linux-mips
On Tue, 20 Dec 2005, Maxime Bizon wrote:
> But "flags" comes directly from di, which according to mips instruction
> set, saves whole status content, not just IE bit.
>
> Attached patch to fix this.
Or alternatively something like this:
"http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=Pine.LNX.4.61L.0507121626370.14155%40blysk.ds.pg.gda.pl",
for consistency with the other variants. It looks like we are the only
two who care...
Maciej
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU
2005-12-20 5:32 [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU Maxime Bizon
2005-12-20 12:00 ` Maciej W. Rozycki
@ 2005-12-22 1:48 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2005-12-22 1:48 UTC (permalink / raw)
To: Maxime Bizon; +Cc: linux-mips
On Tue, Dec 20, 2005 at 06:32:19AM +0100, Maxime Bizon wrote:
>
> I was unable to get my R4KECr2 board working with CONFIG_CPU_MIPSR2 &
> CONFIG_IRQ_CPU, irq delivery is not working.
>
> local_irq_restore() logic is to check that "flags" is non zero, and
> enable irq accordingly.
>
> But "flags" comes directly from di, which according to mips instruction
> set, saves whole status content, not just IE bit.
There are less local_irq_save than local_irq_restore calls, so is the
preferable place for the fix. Applied,
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-22 1:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20 5:32 [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU Maxime Bizon
2005-12-20 12:00 ` Maciej W. Rozycki
2005-12-22 1:48 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox