Return base IRQ of PIC when added and massively increase the number of

available IRQs per PIC for large systems.

MFC after:	3 weeks
This commit is contained in:
Nathan Whitehorn 2017-11-25 22:42:05 +00:00
parent 50d82d6f6a
commit e54979488d
2 changed files with 6 additions and 4 deletions

View File

@ -46,7 +46,7 @@ driver_filter_t powerpc_ipi_handler;
void intrcnt_add(const char *name, u_long **countp);
void powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int);
u_int powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int);
u_int powerpc_get_irq(uint32_t, u_int);
void powerpc_dispatch_intr(u_int, struct trapframe *);

View File

@ -157,7 +157,7 @@ smp_intr_init(void *dummy __unused)
for (vector = 0; vector < nvectors; vector++) {
i = powerpc_intrs[vector];
if (i != NULL && i->pic == root_pic)
if (i != NULL && i->event != NULL && i->pic == root_pic)
PIC_BIND(i->pic, i->intline, i->cpu);
}
}
@ -319,7 +319,7 @@ powerpc_assign_intr_cpu(void *arg, int cpu)
#endif
}
void
u_int
powerpc_register_pic(device_t dev, uint32_t node, u_int irqs, u_int ipis,
u_int atpic)
{
@ -358,6 +358,8 @@ powerpc_register_pic(device_t dev, uint32_t node, u_int irqs, u_int ipis,
("Number of PICs exceeds maximum (%d)", MAX_PICS));
mtx_unlock(&intr_table_lock);
return (p->base);
}
u_int
@ -387,7 +389,7 @@ powerpc_get_irq(uint32_t node, u_int pin)
piclist[idx].irqs = 124;
piclist[idx].ipis = 4;
piclist[idx].base = nirqs;
nirqs += 128;
nirqs += (1 << 25);
npics++;
KASSERT(npics < MAX_PICS,