patch-2.4.20 linux-2.4.20/arch/mips64/kernel/irq.c
Next file: linux-2.4.20/arch/mips64/kernel/irq_cpu.c
Previous file: linux-2.4.20/arch/mips64/kernel/ioctl32.c
Back to the patch index
Back to the overall index
- Lines: 186
- Date:
Thu Nov 28 15:53:10 2002
- Orig file:
linux-2.4.19/arch/mips64/kernel/irq.c
- Orig date:
Fri Aug 2 17:39:43 2002
diff -urN linux-2.4.19/arch/mips64/kernel/irq.c linux-2.4.20/arch/mips64/kernel/irq.c
@@ -31,6 +31,8 @@
irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
+static void register_irq_proc (unsigned int irq);
+
/*
* Special irq handlers.
*/
@@ -48,7 +50,7 @@
{
/*
* 'what should we do if we get a hw irq event on an illegal vector'.
- * each architecture has to answer this themselves, it doesnt deserve
+ * each architecture has to answer this themselves, it doesn't deserve
* a generic callback i think.
*/
printk("unexpected interrupt %d\n", irq);
@@ -87,7 +89,7 @@
for (i = 0 ; i < NR_IRQS ; i++) {
action = irq_desc[i].action;
- if (!action)
+ if (!action)
continue;
p += sprintf(p, "%3d: ",i);
#ifndef CONFIG_SMP
@@ -198,12 +200,12 @@
}
/*
- * A global "cli()" while in an interrupt context turns into just a local
- * cli(). Interrupts should use spinlocks for the (very unlikely) case that
+ * A global "cli()" while in an interrupt context turns into just a local
+ * cli(). Interrupts should use spinlocks for the (very unlikely) case that
* they ever want to protect against each other.
- *
- * If we already have local interrupts disabled, this will not turn a local
- * disable into a global one (problems with spinlocks: this makes
+ *
+ * If we already have local interrupts disabled, this will not turn a local
+ * disable into a global one (problems with spinlocks: this makes
* save_flags+cli+sti usable inside a spinlock).
*/
@@ -317,9 +319,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
@@ -330,7 +332,7 @@
*
* This function may be called from IRQ context.
*/
-
+
void inline disable_irq_nosync(unsigned int irq)
{
irq_desc_t *desc = irq_desc + irq;
@@ -356,7 +358,7 @@
*
* This function may be called - with care - from IRQ context.
*/
-
+
void disable_irq(unsigned int irq)
{
disable_irq_nosync(irq);
@@ -377,7 +379,7 @@
*
* This function may be called from IRQ context.
*/
-
+
void enable_irq(unsigned int irq)
{
irq_desc_t *desc = irq_desc + irq;
@@ -412,7 +414,7 @@
*/
asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
{
- /*
+ /*
* We ack quickly, we don't want the irq controller
* thinking we're snobs just because some other CPU has
* disabled global interrupts (we have already done the
@@ -472,7 +474,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;
@@ -502,7 +504,7 @@
* This call allocates interrupt resources and enables the
* interrupt line and IRQ handling. From the point this
* call is made your handler function may be invoked. Since
- * your handler function must clear any interrupt the board
+ * your handler function must clear any interrupt the board
* raises, you must take care both to initialise your hardware
* and to set up the interrupt handler in the right order.
*
@@ -522,10 +524,10 @@
* SA_SAMPLE_RANDOM The interrupt can be used for entropy
*
*/
-
-int request_irq(unsigned int irq,
+
+int request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
- unsigned long irqflags,
+ unsigned long irqflags,
const char * devname,
void *dev_id)
{
@@ -580,12 +582,12 @@
* does not return until any executing interrupts for this IRQ
* have completed.
*
- * This function may be called from interrupt context.
+ * This function may be called from interrupt context.
*
* Bugs: Attempting to free an irq in a handler for the same irq hangs
* the machine.
*/
-
+
void free_irq(unsigned int irq, void *dev_id)
{
irq_desc_t *desc;
@@ -646,7 +648,7 @@
* and a mask of potential interrupt lines is returned.
*
*/
-
+
unsigned long probe_irq_on(void)
{
unsigned int i;
@@ -655,15 +657,15 @@
unsigned long delay;
down(&probe_sem);
- /*
+ /*
* something may have generated an irq long ago and we want to
- * flush such a longstanding irq before considering it as spurious.
+ * flush such a longstanding irq before considering it as spurious.
*/
for (i = NR_IRQS-1; i > 0; i--) {
desc = irq_desc + i;
spin_lock_irq(&desc->lock);
- if (!irq_desc[i].action)
+ if (!irq_desc[i].action)
irq_desc[i].handler->startup(i);
spin_unlock_irq(&desc->lock);
}
@@ -725,7 +727,7 @@
* Return a mask of triggered interrupts (this
* can handle only legacy ISA interrupts).
*/
-
+
/**
* probe_irq_mask - scan a bitmap of interrupt lines
* @val: mask of interrupts to consider
@@ -787,7 +789,7 @@
* nothing prevents two IRQ probe callers from overlapping. The
* results of this are non-optimal.
*/
-
+
int probe_irq_off(unsigned long val)
{
int i, irq_found, nr_irqs;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)