提交 b88fb83b 编写于 作者: U Uwe Kleine-König

netx: Use get_irqnr_preamble to initialize base register

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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
上级 ed680c4a
...@@ -24,15 +24,13 @@ ...@@ -24,15 +24,13 @@
.endm .endm
.macro get_irqnr_preamble, base, tmp .macro get_irqnr_preamble, base, tmp
ldr \base, =io_p2v(0x001ff000)
.endm .endm
.macro arch_ret_to_user, tmp1, tmp2 .macro arch_ret_to_user, tmp1, tmp2
.endm .endm
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
mov \base, #io_p2v(0x00100000)
add \base, \base, #0x000ff000
ldr \irqstat, [\base, #0] ldr \irqstat, [\base, #0]
clz \irqnr, \irqstat clz \irqnr, \irqstat
rsb \irqnr, \irqnr, #31 rsb \irqnr, \irqnr, #31
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册