6 #define INTERRUPT_LEVEL(n) glue3(XCHAL_INT, n, _LEVEL)
8 .macro make_ccount_delta target, delta
11 sub \delta, \target, \delta
12 slli \delta, \delta, CCOUNT_SHIFT
13 add \target, \target, \delta
41 test ccount_update_deadline
47 #if XCHAL_NUM_TIMERS > 1
50 #if XCHAL_NUM_TIMERS > 2
62 movi a3, 1 << XCHAL_TIMER0_INTERRUPT
72 #if XCHAL_NUM_TIMERS > 1
75 #if XCHAL_NUM_TIMERS > 2
79 make_ccount_delta a2, a15
93 #if INTERRUPT_LEVEL(XCHAL_TIMER0_INTERRUPT) == 1
94 test ccompare0_interrupt
101 #if XCHAL_NUM_TIMERS > 1
104 #if XCHAL_NUM_TIMERS > 2
109 make_ccount_delta a2, a15
115 movi a2, 1 << XCHAL_TIMER0_INTERRUPT
124 assert eqi, a2, 4 /* LEVEL1_INTERRUPT_CAUSE */
128 #if XCHAL_NUM_TIMERS > 1
130 test ccompare1_interrupt
131 set_vector glue(level, INTERRUPT_LEVEL(XCHAL_TIMER1_INTERRUPT)), 2f
138 #if XCHAL_NUM_TIMERS > 2
143 make_ccount_delta a2, a15
148 movi a2, 1 << XCHAL_TIMER1_INTERRUPT
150 rsil a2, INTERRUPT_LEVEL(XCHAL_TIMER1_INTERRUPT) - 1
159 #if XCHAL_NUM_TIMERS > 2
161 test ccompare2_interrupt
162 set_vector glue(level, INTERRUPT_LEVEL(XCHAL_TIMER2_INTERRUPT)), 2f
172 make_ccount_delta a2, a15
177 movi a2, 1 << XCHAL_TIMER2_INTERRUPT
179 rsil a2, INTERRUPT_LEVEL(XCHAL_TIMER2_INTERRUPT) - 1
189 test ccompare_interrupt_masked
190 set_vector kernel, 2f
196 #if XCHAL_NUM_TIMERS > 2
200 movi a3, 2 * WAIT_LOOPS
201 make_ccount_delta a2, a15
202 #if XCHAL_NUM_TIMERS > 1
211 movi a2, 1 << XCHAL_TIMER0_INTERRUPT
220 assert eqi, a2, 4 /* LEVEL1_INTERRUPT_CAUSE */
223 test ccompare_interrupt_masked_waiti
224 set_vector kernel, 2f
230 #if XCHAL_NUM_TIMERS > 2
234 movi a3, 2 * WAIT_LOOPS
235 make_ccount_delta a2, a15
236 #if XCHAL_NUM_TIMERS > 1
245 movi a2, 1 << XCHAL_TIMER0_INTERRUPT
251 assert eqi, a2, 4 /* LEVEL1_INTERRUPT_CAUSE */