X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fsys_titan.c;h=52c91ccc164866d3c08ed24ed6984d7b53e35c65;hb=52833e897fd8c6f62b3e5e27291fa9bc803f7460;hp=e8e8ec9c0f4e2cff6f1690335c2ab9c3794a20ac;hpb=3dbb8c62897f96bbf5d4e4fe649e5d3791fc33c5;p=linux-2.6 diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index e8e8ec9c0f..52c91ccc16 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c @@ -204,7 +204,7 @@ static struct hw_interrupt_type titan_irq_type = { }; static irqreturn_t -titan_intr_nop(int irq, void *dev_id, struct pt_regs *regs) +titan_intr_nop(int irq, void *dev_id) { /* * This is a NOP interrupt handler for the purposes of @@ -243,9 +243,8 @@ titan_legacy_init_irq(void) } void -titan_dispatch_irqs(u64 mask, struct pt_regs *regs) +titan_dispatch_irqs(u64 mask) { - struct pt_regs *old_regs; unsigned long vector; /* @@ -253,27 +252,37 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *regs) */ mask &= titan_cpu_irq_affinity[smp_processor_id()]; - old_regs = set_irq_regs(regs); /* * Dispatch all requested interrupts */ while (mask) { /* convert to SRM vector... priority is <63> -> <0> */ - __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask)); - vector = 63 - vector; + 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); } - set_irq_regs(old_regs); } /* * Titan Family */ +static void __init +titan_request_irq(unsigned int irq, irq_handler_t handler, + unsigned long irqflags, const char *devname, + void *dev_id) +{ + int err; + err = request_irq(irq, handler, irqflags, devname, dev_id); + if (err) { + printk("titan_request_irq for IRQ %d returned %d; ignoring\n", + irq, err); + } +} + static void __init titan_late_init(void) { @@ -282,15 +291,15 @@ titan_late_init(void) * all reported to the kernel as machine checks, so the handler * is a nop so it can be called to count the individual events. */ - request_irq(63+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(63+16, titan_intr_nop, IRQF_DISABLED, "CChip Error", NULL); - request_irq(62+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(62+16, titan_intr_nop, IRQF_DISABLED, "PChip 0 H_Error", NULL); - request_irq(61+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(61+16, titan_intr_nop, IRQF_DISABLED, "PChip 1 H_Error", NULL); - request_irq(60+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(60+16, titan_intr_nop, IRQF_DISABLED, "PChip 0 C_Error", NULL); - request_irq(59+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(59+16, titan_intr_nop, IRQF_DISABLED, "PChip 1 C_Error", NULL); /* @@ -335,9 +344,7 @@ titan_init_pci(void) pci_probe_only = 1; common_init_pci(); SMC669_Init(0); -#ifdef CONFIG_VGA_HOSE locate_and_init_vga(NULL); -#endif } @@ -351,9 +358,9 @@ privateer_init_pci(void) * Hook a couple of extra err interrupts that the * common titan code won't. */ - request_irq(53+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(53+16, titan_intr_nop, IRQF_DISABLED, "NMI", NULL); - request_irq(50+16, titan_intr_nop, IRQF_DISABLED, + titan_request_irq(50+16, titan_intr_nop, IRQF_DISABLED, "Temperature Warning", NULL); /*