alpha: remove trailing spaces in messages
[safe/jmp/linux-2.6] / arch / alpha / kernel / sys_titan.c
index a8bfc8c..9008d0f 100644 (file)
@@ -157,33 +157,35 @@ titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
 
 }
 
-static void
-titan_set_irq_affinity(unsigned int irq, cpumask_t affinity)
+static int
+titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
 { 
        spin_lock(&titan_irq_lock);
-       titan_cpu_set_irq_affinity(irq - 16, affinity);
+       titan_cpu_set_irq_affinity(irq - 16, *affinity);
        titan_update_irq_hw(titan_cached_irq_mask);
        spin_unlock(&titan_irq_lock);
+
+       return 0;
 }
 
 static void
-titan_device_interrupt(unsigned long vector, struct pt_regs * regs)
+titan_device_interrupt(unsigned long vector)
 {
-       printk("titan_device_interrupt: NOT IMPLEMENTED YET!! \n");
+       printk("titan_device_interrupt: NOT IMPLEMENTED YET!!\n");
 }
 
 static void 
-titan_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
+titan_srm_device_interrupt(unsigned long vector)
 {
        int irq;
 
        irq = (vector - 0x800) >> 4;
-       handle_irq(irq, regs);
+       handle_irq(irq);
 }
 
 
 static void __init
-init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
+init_titan_irqs(struct irq_chip * ops, int imin, int imax)
 {
        long i;
        for (i = imin; i <= imax; ++i) {
@@ -192,8 +194,8 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
        }
 }
 
-static struct hw_interrupt_type titan_irq_type = {
-       .typename       = "TITAN",
+static struct irq_chip titan_irq_type = {
+       .name          = "TITAN",
        .startup        = titan_startup_irq,
        .shutdown       = titan_disable_irq,
        .enable         = titan_enable_irq,
@@ -204,7 +206,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,7 +245,7 @@ titan_legacy_init_irq(void)
 }
 
 void
-titan_dispatch_irqs(u64 mask, struct pt_regs *regs)
+titan_dispatch_irqs(u64 mask)
 {
        unsigned long vector;
 
@@ -257,13 +259,12 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *regs)
         */
        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, regs);
+               alpha_mv.device_interrupt(vector);
        }
 }
   
@@ -272,6 +273,19 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *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)
 {
        /*
@@ -279,15 +293,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, SA_INTERRUPT, 
+       titan_request_irq(63+16, titan_intr_nop, IRQF_DISABLED,
                    "CChip Error", NULL);
-       request_irq(62+16, titan_intr_nop, SA_INTERRUPT, 
+       titan_request_irq(62+16, titan_intr_nop, IRQF_DISABLED,
                    "PChip 0 H_Error", NULL);
-       request_irq(61+16, titan_intr_nop, SA_INTERRUPT, 
+       titan_request_irq(61+16, titan_intr_nop, IRQF_DISABLED,
                    "PChip 1 H_Error", NULL);
-       request_irq(60+16, titan_intr_nop, SA_INTERRUPT, 
+       titan_request_irq(60+16, titan_intr_nop, IRQF_DISABLED,
                    "PChip 0 C_Error", NULL);
-       request_irq(59+16, titan_intr_nop, SA_INTERRUPT, 
+       titan_request_irq(59+16, titan_intr_nop, IRQF_DISABLED,
                    "PChip 1 C_Error", NULL);
 
        /* 
@@ -332,9 +346,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
 }
 
 \f
@@ -348,9 +360,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, SA_INTERRUPT, 
+       titan_request_irq(53+16, titan_intr_nop, IRQF_DISABLED,
                    "NMI", NULL);
-       request_irq(50+16, titan_intr_nop, SA_INTERRUPT, 
+       titan_request_irq(50+16, titan_intr_nop, IRQF_DISABLED,
                    "Temperature Warning", NULL);
 
        /*