Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] request_irq(): remove warnings from irq probing

- Add new SA_PROBEIRQ which suppresses the new sharing-mismatch warning.
Some drivers like to use request_irq() to find an unused interrupt slot.

- Use it in i82365.c

- Kill unused SA_PROBE.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andrew Morton and committed by
Linus Torvalds
13e87ec6 47bb7899

+12 -7
+4 -3
drivers/pcmcia/i82365.c
··· 509 509 static u_int __init test_irq(u_short sock, int irq) 510 510 { 511 511 debug(2, " testing ISA irq %d\n", irq); 512 - if (request_irq(irq, i365_count_irq, 0, "scan", i365_count_irq) != 0) 512 + if (request_irq(irq, i365_count_irq, SA_PROBEIRQ, "scan", 513 + i365_count_irq) != 0) 513 514 return 1; 514 515 irq_hits = 0; irq_sock = sock; 515 516 msleep(10); ··· 562 561 } else { 563 562 /* Fallback: just find interrupts that aren't in use */ 564 563 for (i = 0; i < 16; i++) 565 - if ((mask0 & (1 << i)) && (_check_irq(i, 0) == 0)) 564 + if ((mask0 & (1 << i)) && (_check_irq(i, SA_PROBEIRQ) == 0)) 566 565 mask1 |= (1 << i); 567 566 printk("default"); 568 567 /* If scan failed, default to polled status */ ··· 726 725 u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12)); 727 726 for (cs_irq = 15; cs_irq > 0; cs_irq--) 728 727 if ((cs_mask & (1 << cs_irq)) && 729 - (_check_irq(cs_irq, 0) == 0)) 728 + (_check_irq(cs_irq, SA_PROBEIRQ) == 0)) 730 729 break; 731 730 if (cs_irq) { 732 731 grab_irq = 1;
+1 -1
include/asm-xtensa/signal.h
··· 118 118 * SA_INTERRUPT is also used by the irq handling routines. 119 119 * SA_SHIRQ is for shared interrupt support on PCI and EISA. 120 120 */ 121 - #define SA_PROBE SA_ONESHOT 122 121 #define SA_SAMPLE_RANDOM SA_RESTART 123 122 #define SA_SHIRQ 0x04000000 123 + #define SA_PROBEIRQ 0x08000000 124 124 #endif 125 125 126 126 #define SIG_BLOCK 0 /* for blocking signals */
+3 -1
include/linux/signal.h
··· 14 14 * 15 15 * SA_INTERRUPT is also used by the irq handling routines. 16 16 * SA_SHIRQ is for shared interrupt support on PCI and EISA. 17 + * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur 17 18 */ 18 - #define SA_PROBE SA_ONESHOT 19 19 #define SA_SAMPLE_RANDOM SA_RESTART 20 20 #define SA_SHIRQ 0x04000000 21 + #define SA_PROBEIRQ 0x08000000 22 + 21 23 /* 22 24 * As above, these correspond to the IORESOURCE_IRQ_* defines in 23 25 * linux/ioport.h to select the interrupt line behaviour. When
+4 -2
kernel/irq/manage.c
··· 246 246 247 247 mismatch: 248 248 spin_unlock_irqrestore(&desc->lock, flags); 249 - printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__); 250 - dump_stack(); 249 + if (!(new->flags & SA_PROBEIRQ)) { 250 + printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__); 251 + dump_stack(); 252 + } 251 253 return -EBUSY; 252 254 } 253 255