patch-2.4.22 linux-2.4.22/arch/ppc/kernel/irq.c

Next file: linux-2.4.22/arch/ppc/kernel/l2cr.S
Previous file: linux-2.4.22/arch/ppc/kernel/indirect_pci.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/ppc/kernel/irq.c linux-2.4.22/arch/ppc/kernel/irq.c
@@ -10,7 +10,7 @@
  *  Adapted for Power Macintosh by Paul Mackerras
  *    Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
  *  Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
- *  
+ *
  * This file contains the code used by various IRQ handling routines:
  * asking for different IRQ's should be done through these routines
  * instead of just grabbing them. Thus setups with different IRQ numbers
@@ -68,7 +68,7 @@
 
 irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
 	{ [0 ... NR_IRQS-1] = { 0, NULL, NULL, 0, SPIN_LOCK_UNLOCKED}};
-	
+
 int ppc_spurious_interrupts = 0;
 struct irqaction *ppc_irq_action[NR_IRQS];
 unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
@@ -234,28 +234,28 @@
 		free_irq(irq, dev_id);
 		return 0;
 	}
-	
+
 	action = (struct irqaction *)
 		irq_kmalloc(sizeof(struct irqaction), GFP_KERNEL);
 	if (!action) {
 		printk(KERN_ERR "irq_kmalloc() failed for irq %d !\n", irq);
 		return -ENOMEM;
 	}
-	
+
 	action->handler = handler;
-	action->flags = irqflags;					
+	action->flags = irqflags;
 	action->mask = 0;
 	action->name = devname;
 	action->dev_id = dev_id;
 	action->next = NULL;
-	
+
 	retval = setup_irq(irq, action);
 	if (retval)
 	{
 		kfree(action);
 		return retval;
 	}
-		
+
 	return 0;
 }
 
@@ -263,9 +263,9 @@
  * Generic enable/disable code: this just calls
  * down into the PIC-specific version for the actual
  * hardware disable after having gotten the irq
- * controller lock. 
+ * controller lock.
  */
- 
+
 /**
  *	disable_irq_nosync - disable an irq without waiting
  *	@irq: Interrupt to disable
@@ -276,7 +276,7 @@
  *
  *	This function may be called from IRQ context.
  */
- 
+
  void disable_irq_nosync(unsigned int irq)
 {
 	irq_desc_t *desc = irq_desc + irq;
@@ -303,7 +303,7 @@
  *
  *	This function may be called - with care - from IRQ context.
  */
- 
+
 void disable_irq(unsigned int irq)
 {
 	disable_irq_nosync(irq);
@@ -324,7 +324,7 @@
  *
  *	This function may be called from IRQ context.
  */
- 
+
 void enable_irq(unsigned int irq)
 {
 	irq_desc_t *desc = irq_desc + irq;
@@ -365,15 +365,15 @@
 		action = irq_desc[i].action;
 		if ( !action || !action->handler )
 			continue;
-		len += sprintf(buf+len, "%3d: ", i);		
+		len += sprintf(buf+len, "%3d: ", i);
 #ifdef CONFIG_SMP
 		for (j = 0; j < smp_num_cpus; j++)
 			len += sprintf(buf+len, "%10u ",
 				kstat.irqs[cpu_logical_map(j)][i]);
-#else		
+#else
 		len += sprintf(buf+len, "%10u ", kstat_irqs(i));
 #endif /* CONFIG_SMP */
-		if ( irq_desc[i].handler )		
+		if ( irq_desc[i].handler )
 			len += sprintf(buf+len, " %s ", irq_desc[i].handler->typename );
 		else
 			len += sprintf(buf+len, "  None      ");
@@ -397,7 +397,7 @@
 	/* should this be per processor send/receive? */
 	len += sprintf(buf+len, "IPI (recv/sent): %10u/%u\n",
 		       atomic_read(&ipi_recv), atomic_read(&ipi_sent));
-#endif		
+#endif
 	len += sprintf(buf+len, "BAD: %10u\n", ppc_spurious_interrupts);
 	return len;
 }
@@ -433,7 +433,7 @@
 
 	kstat.irqs[cpu][irq]++;
 	spin_lock(&desc->lock);
-	ack_irq(irq);	
+	ack_irq(irq);
 	/*
 	   REPLAY is when Linux resends an IRQ that was dropped earlier
 	   WAITING is used by probe to mark irqs that are being tested
@@ -490,7 +490,7 @@
 		spin_unlock(&desc->lock);
 		handle_irq_event(irq, regs, action);
 		spin_lock(&desc->lock);
-		
+
 		if (!(desc->status & IRQ_PENDING))
 			break;
 		desc->status &= ~IRQ_PENDING;
@@ -561,7 +561,7 @@
 		return;
 	else
 		once++;
-	
+
 	ppc_md.init_IRQ();
 }
 
@@ -700,11 +700,11 @@
 #endif
 				}
 			} while (test_bit(0,&global_irq_lock));
-		} while (test_and_set_bit(0,&global_irq_lock));		
+		} while (test_and_set_bit(0,&global_irq_lock));
 	}
-	/* 
+	/*
 	 * We also need to make sure that nobody else is running
-	 * in an interrupt context. 
+	 * in an interrupt context.
 	 */
 	wait_on_irq(cpu);
 
@@ -729,7 +729,7 @@
 void __global_cli(void)
 {
 	unsigned long flags;
-	
+
 	__save_flags(flags);
 	if (flags & (1 << 15)) {
 		int cpu = smp_processor_id();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)