summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/irq.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
commit230e5ab6a084ed50470f101934782dbf54b0d06b (patch)
tree5dd821c8d33f450470588e7a543f74bf74306e9e /arch/alpha/kernel/irq.c
parentc9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff)
Merge with Linux 2.1.67.
Diffstat (limited to 'arch/alpha/kernel/irq.c')
-rw-r--r--arch/alpha/kernel/irq.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 133c27828..3291f4603 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -37,6 +37,18 @@
# error Unable to handle more than 64 irq levels.
#endif
+/* PROBE_MASK is the bitset of irqs that we consider for autoprobing: */
+#if defined(CONFIG_ALPHA_P2K)
+ /* always mask out unused timer irq 0 and RTC irq 8 */
+# define PROBE_MASK (((1UL << NR_IRQS) - 1) & ~0x101UL)
+#elif defined(CONFIG_ALPHA_ALCOR)
+ /* always mask out unused timer irq 0, "irqs" 20-30, and the EISA cascade: */
+# define PROBE_MASK (((1UL << NR_IRQS) - 1) & ~0xfff000000001UL)
+#else
+ /* always mask out unused timer irq 0: */
+# define PROBE_MASK (((1UL << NR_IRQS) - 1) & ~1UL)
+#endif
+
/* Reserved interrupts. These must NEVER be requested by any driver!
*/
#define IS_RESERVED_IRQ(irq) ((irq)==2) /* IRQ 2 used by hw cascade */
@@ -644,10 +656,13 @@ unsigned long probe_irq_on(void)
unsigned int i;
for (i = NR_IRQS - 1; i > 0; i--) {
+ if (!(PROBE_MASK & (1UL << i))) {
+ continue;
+ }
action = irq_action[i];
if (!action) {
enable_irq(i);
- irqs |= (1 << i);
+ irqs |= (1UL << i);
}
}
/*
@@ -668,14 +683,10 @@ unsigned long probe_irq_on(void)
*/
int probe_irq_off(unsigned long irqs)
{
+ unsigned long delay;
int i;
- /* as irq 0 & 8 handling don't use this function, i didn't
- * bother changing the following: */
- irqs &= irq_mask & ~1; /* always mask out irq 0---it's the unused timer */
-#ifdef CONFIG_ALPHA_P2K
- irqs &= ~(1 << 8); /* mask out irq 8 since that's the unused RTC input to PIC */
-#endif
+ irqs &= irq_mask;
if (!irqs)
return 0;
i = ffz(~irqs);