Skip to content

Commit

Permalink
netx: Use get_irqnr_preamble to initialize base register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König committed Aug 13, 2009
1 parent ed680c4 commit b88fb83
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/arm/mach-netx/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@
.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
Expand Down

0 comments on commit b88fb83

Please sign in to comment.