irq_unmask = titan_enable_irq, .irq_mask = titan_disable_irq, .irq_mask_ack = titan_disable_irq, .irq_set_affinity = titan_set_irq_affinity, }; static irqreturn_t titan_intr_nop(int irq, void *dev_id) { /* * This is a NOP interrupt handler for the purposes of * event counting -- just return. */ return IRQ_HANDLED; } static void __init titan_init_irq(void) { if (alpha_using_srm && !alpha_mv.device_interrupt) alpha_mv.device_interrupt = titan_srm_device_interrupt; if (!alpha_mv.device_interrupt) alpha_mv.device_interrupt = titan_device_interrupt; titan_update_irq_hw(0); init_titan_irqs(&titan_irq_type, 16, 63 + 16); } static void __init titan_legacy_init_irq(void) { /* init the legacy dma controller */ outb(0, DMA1_RESET_REG); outb(0, DMA2_RESET_REG); outb(DMA_MODE_CASCADE, DMA2_MODE_REG); outb(0, DMA2_MASK_REG); /* init the legacy irq controller */ init_i8259a_irqs(); /* init the titan irqs */ titan_init_irq(); } void titan_dispatch_irqs(u64 mask) { unsigned long vector; /* * Mask down to those interrupts which are enable on this processor */ mask &= titan_cpu_irq_affinity[smp_processor_id()]; /* * Dispatch all requested interrupts */ while (mask) { /* convert to SRM vector... priority is <63> -> <0> */ vector = 63 - __kernel_ctlz(mask); mask &= ~(1UL << vector); /* clear it out */ vector = 0x900 + (vector << 4); /* convert to SRM vector */ /* dispatch it */ alpha_mv.device_interrupt(vector); } }