netx: Use get_irqnr_preamble to initialize base register
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 13 Aug 2009 18:38:16 +0000 (20:38 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 13 Aug 2009 18:34:36 +0000 (20:34 +0200)
This patch optimizes the irq handling a bit.  Now the base register is
only computed once per irq exception instead of at least twice.
Moreover the mov+add sequence is simplified to an ldr (which might save
some cycles depending on memory timing).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/mach-netx/include/mach/entry-macro.S

index a1952a0feda62535d44d288674f05e60e5eb0178..844f1f9acbdf09705f653563ed3a4052398d6a5e 100644 (file)
                .endm
 
                .macro  get_irqnr_preamble, base, tmp
+               ldr     \base, =io_p2v(0x001ff000)
                .endm
 
                .macro  arch_ret_to_user, tmp1, tmp2
                .endm
 
                .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-               mov     \base, #io_p2v(0x00100000)
-               add     \base, \base, #0x000ff000
-
                ldr     \irqstat, [\base, #0]
                clz     \irqnr, \irqstat
                rsb     \irqnr, \irqnr, #31