for (irq = 0; irq < ICU_LEN; irq++)
for (irq = 0; irq < 255; irq++)
openpic_init(){        int irq;        u_int x;        /* disable all interrupts */        for (irq = 0; irq < ICU_LEN; irq++)                openpic_write(OPENPIC_SRC_VECTOR(irq), OPENPIC_IMASK);        openpic_set_priority(0, 15);        /* we don't need 8259 pass through mode */        x = openpic_read(OPENPIC_CONFIG);        x |= OPENPIC_CONFIG_8259_PASSTHRU_DISABLE;        openpic_write(OPENPIC_CONFIG, x);        /* send all interrupts to cpu 0 */        for (irq = 0; irq < ICU_LEN; irq++)                openpic_write(OPENPIC_IDEST(irq), 1 << 0);        for (irq = 0; irq < ICU_LEN; irq++) {                x = irq;                x |= OPENPIC_IMASK;                x |= OPENPIC_POLARITY_POSITIVE;                x |= OPENPIC_SENSE_LEVEL;                x |= 8 << OPENPIC_PRIORITY_SHIFT;                openpic_write(OPENPIC_SRC_VECTOR(irq), x);        }        /* XXX set spurious intr vector */        openpic_set_priority(0, 0);        /* clear all pending interrunts */        for (irq = 0; irq < ICU_LEN; irq++) {                openpic_read_irq(0);                openpic_eoi(0);        }        for (irq = 0; irq < ICU_LEN; irq++)                openpic_disable_irq(irq);        install_extint(ext_intr_openpic);}