All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix irq handling of DECstations
@ 2007-02-12 14:48 Atsushi Nemoto
  2007-02-13  2:25 ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Atsushi Nemoto @ 2007-02-12 14:48 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, vagabon.xyz

It looks 2.6.19 or 2.6.20 does not work on DECStations.

When I post a patch (commit f431baa55abf8adeed0c718b51deacbc151f58f1),
I just tried to not change behavior of existing codes, but it seems
dec/int-handler.S had been broken since its previous commit
937a801576f954bd030d7c4a5a94571710d87c0b.

The caller of plat_irq_dispatch do setup/restore TI_REGS($28), so
dec's plat_irq_dispatch should not do it, and there is no need to
adjust RA.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index b251ef8..00cecdc 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -264,9 +264,6 @@
 		 srlv	t3,t1,t2
 
 handle_it:
-		LONG_L	s0, TI_REGS($28)
-		LONG_S	sp, TI_REGS($28)
-		PTR_LA	ra, ret_from_irq
 		j	dec_irq_dispatch
 		 nop
 
@@ -277,7 +274,6 @@ fpu:
 #endif
 
 spurious:
-		PTR_LA	ra, _ret_from_irq
 		j	spurious_interrupt
 		 nop
 		END(plat_irq_dispatch)

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

* Re: [PATCH] fix irq handling of DECstations
  2007-02-12 14:48 [PATCH] fix irq handling of DECstations Atsushi Nemoto
@ 2007-02-13  2:25 ` Ralf Baechle
  2007-02-13 13:50   ` Franck Bui-Huu
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2007-02-13  2:25 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips, vagabon.xyz

On Mon, Feb 12, 2007 at 11:48:26PM +0900, Atsushi Nemoto wrote:

> It looks 2.6.19 or 2.6.20 does not work on DECStations.

Applied.  Thanks,

  Ralf

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

* Re: [PATCH] fix irq handling of DECstations
  2007-02-13  2:25 ` Ralf Baechle
@ 2007-02-13 13:50   ` Franck Bui-Huu
  2007-02-13 15:27     ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Franck Bui-Huu @ 2007-02-13 13:50 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips, vagabon.xyz

Ralf Baechle wrote:
> On Mon, Feb 12, 2007 at 11:48:26PM +0900, Atsushi Nemoto wrote:
> 
>> It looks 2.6.19 or 2.6.20 does not work on DECStations.
> 
> Applied.  Thanks,
> 

Hi Ralf,

Since you applied Atsushi's patch, can you consider the following
one ?

thanks
		Franck

-- >8 --

From: Franck Bui-Huu <fbuihuu@gmail.com>

This patch makes these routines a lot more readable whatever
the value of CONFIG_PREEMPT.

When CONFIG_PREEMPT is not set, it also moves one branch
instruction from ret_from_irq() to ret_from_exception().
Therefore we favour the return from irq case which should be
more common than the other one.

Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/entry.S |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index f10b6a1..c7429b2 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -21,24 +21,21 @@
 #endif
 
 #ifndef CONFIG_PREEMPT
-	.macro	preempt_stop
-	local_irq_disable
-	.endm
 #define resume_kernel	restore_all
+#else
+#define __ret_from_irq	ret_from_exception
 #endif
 
 	.text
 	.align	5
-FEXPORT(ret_from_irq)
-	LONG_S	s0, TI_REGS($28)
-#ifdef CONFIG_PREEMPT
+#ifndef CONFIG_PREEMPT
 FEXPORT(ret_from_exception)
-#else
+	local_irq_disable			# preempt stop
 	b	_ret_from_irq
-FEXPORT(ret_from_exception)
-	preempt_stop
 #endif
-FEXPORT(_ret_from_irq)
+FEXPORT(ret_from_irq)
+	LONG_S	s0, TI_REGS($28)
+FEXPORT(__ret_from_irq)
 	LONG_L	t0, PT_STATUS(sp)		# returning to kernel mode?
 	andi	t0, t0, KU_USER
 	beqz	t0, resume_kernel
-- 
1.4.4.3.ge6d4

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

* Re: [PATCH] fix irq handling of DECstations
  2007-02-13 13:50   ` Franck Bui-Huu
@ 2007-02-13 15:27     ` Ralf Baechle
  2007-02-13 17:01       ` Franck Bui-Huu
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2007-02-13 15:27 UTC (permalink / raw)
  To: Franck Bui-Huu; +Cc: Atsushi Nemoto, linux-mips

On Tue, Feb 13, 2007 at 02:50:18PM +0100, Franck Bui-Huu wrote:

> This patch makes these routines a lot more readable whatever
> the value of CONFIG_PREEMPT.

Applied.

   Ralf

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

* Re: [PATCH] fix irq handling of DECstations
  2007-02-13 15:27     ` Ralf Baechle
@ 2007-02-13 17:01       ` Franck Bui-Huu
  2007-02-13 17:22         ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Franck Bui-Huu @ 2007-02-13 17:01 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Atsushi Nemoto, linux-mips

On 2/13/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Tue, Feb 13, 2007 at 02:50:18PM +0100, Franck Bui-Huu wrote:
>
> > This patch makes these routines a lot more readable whatever
> > the value of CONFIG_PREEMPT.
>
> Applied.

argh there's a small mistake. Could you amend this fix ?

-- >8 --

diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index c7429b2..0b78fcb 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -31,7 +31,7 @@
 #ifndef CONFIG_PREEMPT
 FEXPORT(ret_from_exception)
 	local_irq_disable			# preempt stop
-	b	_ret_from_irq
+	b	__ret_from_irq
 #endif
 FEXPORT(ret_from_irq)
 	LONG_S	s0, TI_REGS($28)

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

* Re: [PATCH] fix irq handling of DECstations
  2007-02-13 17:01       ` Franck Bui-Huu
@ 2007-02-13 17:22         ` Ralf Baechle
  0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2007-02-13 17:22 UTC (permalink / raw)
  To: Franck Bui-Huu; +Cc: Atsushi Nemoto, linux-mips

On Tue, Feb 13, 2007 at 06:01:56PM +0100, Franck Bui-Huu wrote:

> argh there's a small mistake. Could you amend this fix ?

Fortunately I haven't pushed yet, so yes, will do git surgery :)

  Ralf

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

end of thread, other threads:[~2007-02-13 17:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 14:48 [PATCH] fix irq handling of DECstations Atsushi Nemoto
2007-02-13  2:25 ` Ralf Baechle
2007-02-13 13:50   ` Franck Bui-Huu
2007-02-13 15:27     ` Ralf Baechle
2007-02-13 17:01       ` Franck Bui-Huu
2007-02-13 17:22         ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.