Drop a warning when someone resisters a shareable SA_INTERRUPT irq handler. This doesn't make sense, because the non-SA_INTERRUPT handler expects to run with interrupts enabled. And sharing SA_INTERRUPT handlers causes larger-than-designed interrupt latency. 25-akpm/arch/i386/kernel/irq.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff -puN arch/i386/kernel/irq.c~shared-irq-warning arch/i386/kernel/irq.c --- 25/arch/i386/kernel/irq.c~shared-irq-warning Tue Mar 4 14:30:37 2003 +++ 25-akpm/arch/i386/kernel/irq.c Tue Mar 4 14:33:54 2003 @@ -449,6 +449,10 @@ out: * * SA_SAMPLE_RANDOM The interrupt can be used for entropy * + * SA_SHIRQ|SA_INTERRUPT is not a sensible or legal combination, because + * a non-SA_INTERRUPT handler expects to run with interrupts enabled. + * And sharing SA_INTERRUPT handlers causes larger-than-designed interrupt + * latency. */ int request_irq(unsigned int irq, @@ -460,7 +464,6 @@ int request_irq(unsigned int irq, int retval; struct irqaction * action; -#if 1 /* * Sanity-check: shared interrupts should REALLY pass in * a real dev-ID, otherwise we'll have trouble later trying @@ -468,18 +471,15 @@ int request_irq(unsigned int irq, * interrupt freeing logic etc). */ if (irqflags & SA_SHIRQ) { - if (!dev_id) - printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]); + WARN_ON(!dev_id); + WARN_ON(irqflags & SA_INTERRUPT); } -#endif - if (irq >= NR_IRQS) return -EINVAL; if (!handler) return -EINVAL; - action = (struct irqaction *) - kmalloc(sizeof(struct irqaction), GFP_ATOMIC); + action = kmalloc(sizeof(*action), GFP_ATOMIC); if (!action) return -ENOMEM; _