patch-2.4.0-test6 linux/arch/sh/kernel/irq.c
Next file: linux/arch/sh/kernel/irq_imask.c
Previous file: linux/arch/sh/kernel/io_unknown.c
Back to the patch index
Back to the overall index
- Lines: 113
- Date:
Wed Aug 9 13:59:04 2000
- Orig file:
v2.4.0-test5/linux/arch/sh/kernel/irq.c
- Orig date:
Thu Jul 27 17:37:59 2000
diff -u --recursive --new-file v2.4.0-test5/linux/arch/sh/kernel/irq.c linux/arch/sh/kernel/irq.c
@@ -37,13 +37,6 @@
#include <asm/irq.h>
#include <linux/irq.h>
-#ifdef CONFIG_HD64461
-#include <asm/hd64461.h>
-#endif
-
-unsigned int __local_bh_count[NR_CPUS];
-unsigned int __local_irq_count[NR_CPUS];
-
/*
* Micro-access to controllers is serialized over the whole
* system. We never hold this lock when we call the actual
@@ -97,6 +90,7 @@
* Generic, controller-independent functions:
*/
+#if defined(CONFIG_PROC_FS)
int get_irq_list(char *buf)
{
int i, j;
@@ -108,7 +102,7 @@
p += sprintf(p, "CPU%d ",j);
*p++ = '\n';
- for (i = 0 ; i < NR_IRQS ; i++) {
+ for (i = 0 ; i < ACTUAL_NR_IRQS ; i++) {
action = irq_desc[i].action;
if (!action)
continue;
@@ -123,6 +117,7 @@
}
return p - buf;
}
+#endif
/*
* This should really return information about whether
@@ -183,7 +178,7 @@
{
disable_irq_nosync(irq);
- if (!__local_irq_count[smp_processor_id()]) {
+ if (!local_irq_count(smp_processor_id())) {
do {
barrier();
} while (irq_desc[irq].status & IRQ_INPROGRESS);
@@ -246,18 +241,7 @@
"shlr %0\n\t"
"add #-16, %0\n\t"
:"=z" (irq));
-#if defined(CONFIG_HD64461)
- if (irq == CONFIG_HD64461_IRQ) {
- unsigned short bit;
- unsigned short nirr = inw(HD64461_NIRR);
- unsigned short nimr = inw(HD64461_NIMR);
- nirr &= ~nimr;
- for (bit = 1, irq = 0; irq < 16; bit <<= 1, irq++)
- if (nirr & bit) break;
- if (irq == 16) irq = CONFIG_HD64461_IRQ;
- else irq += HD64461_IRQBASE;
- }
-#endif
+ irq = irq_demux(irq);
kstat.irqs[cpu][irq]++;
desc = irq_desc + irq;
@@ -319,7 +303,7 @@
#if 0
__sti();
#endif
- if (softirq_state[cpu].active&softirq_state[cpu].mask)
+ if (softirq_active(cpu)&softirq_mask(cpu))
do_softirq();
return 1;
}
@@ -333,7 +317,7 @@
int retval;
struct irqaction * action;
- if (irq >= NR_IRQS)
+ if (irq >= ACTUAL_NR_IRQS)
return -EINVAL;
if (!handler)
return -EINVAL;
@@ -361,7 +345,7 @@
struct irqaction **p;
unsigned long flags;
- if (irq >= NR_IRQS)
+ if (irq >= ACTUAL_NR_IRQS)
return;
spin_lock_irqsave(&irq_controller_lock,flags);
@@ -411,7 +395,7 @@
for (i = NR_IRQS-1; i > 0; i--) {
if (!irq_desc[i].action) {
irq_desc[i].status |= IRQ_AUTODETECT | IRQ_WAITING;
- if(irq_desc[i].handler->startup(i))
+ if (irq_desc[i].handler->startup(i))
irq_desc[i].status |= IRQ_PENDING;
}
}
@@ -433,7 +417,7 @@
if (!(status & IRQ_AUTODETECT))
continue;
-
+
/* It triggered already - consider it spurious. */
if (!(status & IRQ_WAITING)) {
irq_desc[i].status = status & ~IRQ_AUTODETECT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)