Lines Matching full:irq
41 uint8_t priority_add; /* highest irq priority */
75 /* set irq level. If an edge is detected, then the IRR is set to 1 */
76 static inline void pic_set_irq1(PicState *s, int irq, int level)
79 mask = 1 << irq;
102 number). Return 8 if no irq */
124 master, the IRQ coming from the slave is not taken into account
133 /* higher priority found: an irq should be generated */
140 /* raise irq to CPU if necessary. must be called every time the active
141 irq may change */
145 int irq2, irq;
150 /* if irq request by slave pic, signal master PIC */
154 /* look at requested irq */
155 irq = pic_get_irq(&s->pics[0]);
156 if (irq >= 0) {
172 /* all targets should do this rather than acking the IRQ in the cpu */
184 static void i8259_set_irq(void *opaque, int irq, int level)
189 if (level != irq_level[irq]) {
191 printf("i8259_set_irq: irq=%d level=%d\n", irq, level);
193 irq_level[irq] = level;
196 irq_count[irq]++;
202 irq_time[irq] = qemu_get_clock(vm_clock);
205 pic_set_irq1(&s->pics[irq >> 3], irq & 7, level);
208 s->alt_irq_func(s->alt_irq_opaque, irq, level);
212 /* acknowledge interrupt 'irq' */
213 static inline void pic_intack(PicState *s, int irq)
217 s->priority_add = (irq + 1) & 7;
219 s->isr |= (1 << irq);
222 if (!(s->elcr & (1 << irq)))
223 s->irr &= ~(1 << irq);
228 int irq, irq2, intno;
230 irq = pic_get_irq(&s->pics[0]);
231 if (irq >= 0) {
232 pic_intack(&s->pics[0], irq);
233 if (irq == 2) {
238 /* spurious IRQ on slave controller */
242 irq = irq2 + 8;
244 intno = s->pics[0].irq_base + irq;
247 /* spurious IRQ on host controller */
248 irq = 7;
249 intno = s->pics[0].irq_base + irq;
254 printf("IRQ%d latency=%0.3fus\n",
255 irq,
256 (double)(qemu_get_clock(vm_clock) - irq_time[irq]) * 1000000.0 / get_ticks_per_sec);
259 printf("pic_interrupt: irq=%d\n", irq);
289 int priority, cmd, irq;
305 hw_error("level sensitive irq not supported");
324 irq = (priority + s->priority_add) & 7;
325 s->isr &= ~(1 << irq);
327 s->priority_add = (irq + 1) & 7;
332 irq = val & 7;
333 s->isr &= ~(1 << irq);
341 irq = val & 7;
342 s->isr &= ~(1 << irq);
343 s->priority_add = (irq + 1) & 7;
536 monitor_printf(mon, "irq statistic code not compiled.\n");
541 monitor_printf(mon, "IRQ statistics:\n");