Rev 3790 | Rev 4132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3790 | Rev 3906 | ||
---|---|---|---|
Line 142... | Line 142... | ||
142 | { |
142 | { |
143 | uint32_t cause; |
143 | uint32_t cause; |
144 | int i; |
144 | int i; |
145 | 145 | ||
146 | /* decode interrupt number and process the interrupt */ |
146 | /* decode interrupt number and process the interrupt */ |
147 | cause = (cp0_cause_read() >> 8) &0xff; |
147 | cause = (cp0_cause_read() >> 8) & 0xff; |
148 | 148 | ||
149 | for (i = 0; i < 8; i++) { |
149 | for (i = 0; i < 8; i++) { |
150 | if (cause & (1 << i)) { |
150 | if (cause & (1 << i)) { |
151 | irq_t *irq = irq_dispatch_and_lock(i); |
151 | irq_t *irq = irq_dispatch_and_lock(i); |
152 | if (irq) { |
152 | if (irq) { |
153 | /* |
153 | /* |
154 | * The IRQ handler was found. |
154 | * The IRQ handler was found. |
155 | */ |
155 | */ |
156 | irq->handler(irq, irq->arg); |
156 | irq->handler(irq); |
157 | spinlock_unlock(&irq->lock); |
157 | spinlock_unlock(&irq->lock); |
158 | } else { |
158 | } else { |
159 | /* |
159 | /* |
160 | * Spurious interrupt. |
160 | * Spurious interrupt. |
161 | */ |
161 | */ |
162 | #ifdef CONFIG_DEBUG |
162 | #ifdef CONFIG_DEBUG |
163 | printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, i); |
163 | printf("cpu%u: spurious interrupt (inum=%d)\n", |
- | 164 | CPU->id, i); |
|
164 | #endif |
165 | #endif |
165 | } |
166 | } |
166 | } |
167 | } |
167 | } |
168 | } |
168 | } |
169 | } |