mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
[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>
This commit is contained in:
parent
47bb789973
commit
13e87ec686
@ -509,7 +509,8 @@ static irqreturn_t i365_count_irq(int irq, void *dev, struct pt_regs *regs)
|
|||||||
static u_int __init test_irq(u_short sock, int irq)
|
static u_int __init test_irq(u_short sock, int irq)
|
||||||
{
|
{
|
||||||
debug(2, " testing ISA irq %d\n", irq);
|
debug(2, " testing ISA irq %d\n", irq);
|
||||||
if (request_irq(irq, i365_count_irq, 0, "scan", i365_count_irq) != 0)
|
if (request_irq(irq, i365_count_irq, SA_PROBEIRQ, "scan",
|
||||||
|
i365_count_irq) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
irq_hits = 0; irq_sock = sock;
|
irq_hits = 0; irq_sock = sock;
|
||||||
msleep(10);
|
msleep(10);
|
||||||
@ -561,7 +562,7 @@ static u_int __init isa_scan(u_short sock, u_int mask0)
|
|||||||
} else {
|
} else {
|
||||||
/* Fallback: just find interrupts that aren't in use */
|
/* Fallback: just find interrupts that aren't in use */
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
if ((mask0 & (1 << i)) && (_check_irq(i, 0) == 0))
|
if ((mask0 & (1 << i)) && (_check_irq(i, SA_PROBEIRQ) == 0))
|
||||||
mask1 |= (1 << i);
|
mask1 |= (1 << i);
|
||||||
printk("default");
|
printk("default");
|
||||||
/* If scan failed, default to polled status */
|
/* If scan failed, default to polled status */
|
||||||
@ -725,7 +726,7 @@ static void __init add_pcic(int ns, int type)
|
|||||||
u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12));
|
u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12));
|
||||||
for (cs_irq = 15; cs_irq > 0; cs_irq--)
|
for (cs_irq = 15; cs_irq > 0; cs_irq--)
|
||||||
if ((cs_mask & (1 << cs_irq)) &&
|
if ((cs_mask & (1 << cs_irq)) &&
|
||||||
(_check_irq(cs_irq, 0) == 0))
|
(_check_irq(cs_irq, SA_PROBEIRQ) == 0))
|
||||||
break;
|
break;
|
||||||
if (cs_irq) {
|
if (cs_irq) {
|
||||||
grab_irq = 1;
|
grab_irq = 1;
|
||||||
|
@ -118,9 +118,9 @@ typedef struct {
|
|||||||
* SA_INTERRUPT is also used by the irq handling routines.
|
* SA_INTERRUPT is also used by the irq handling routines.
|
||||||
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
||||||
*/
|
*/
|
||||||
#define SA_PROBE SA_ONESHOT
|
|
||||||
#define SA_SAMPLE_RANDOM SA_RESTART
|
#define SA_SAMPLE_RANDOM SA_RESTART
|
||||||
#define SA_SHIRQ 0x04000000
|
#define SA_SHIRQ 0x04000000
|
||||||
|
#define SA_PROBEIRQ 0x08000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SIG_BLOCK 0 /* for blocking signals */
|
#define SIG_BLOCK 0 /* for blocking signals */
|
||||||
|
@ -14,10 +14,12 @@
|
|||||||
*
|
*
|
||||||
* SA_INTERRUPT is also used by the irq handling routines.
|
* SA_INTERRUPT is also used by the irq handling routines.
|
||||||
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
||||||
|
* SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
|
||||||
*/
|
*/
|
||||||
#define SA_PROBE SA_ONESHOT
|
|
||||||
#define SA_SAMPLE_RANDOM SA_RESTART
|
#define SA_SAMPLE_RANDOM SA_RESTART
|
||||||
#define SA_SHIRQ 0x04000000
|
#define SA_SHIRQ 0x04000000
|
||||||
|
#define SA_PROBEIRQ 0x08000000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As above, these correspond to the IORESOURCE_IRQ_* defines in
|
* As above, these correspond to the IORESOURCE_IRQ_* defines in
|
||||||
* linux/ioport.h to select the interrupt line behaviour. When
|
* linux/ioport.h to select the interrupt line behaviour. When
|
||||||
|
@ -246,8 +246,10 @@ int setup_irq(unsigned int irq, struct irqaction * new)
|
|||||||
|
|
||||||
mismatch:
|
mismatch:
|
||||||
spin_unlock_irqrestore(&desc->lock, flags);
|
spin_unlock_irqrestore(&desc->lock, flags);
|
||||||
printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__);
|
if (!(new->flags & SA_PROBEIRQ)) {
|
||||||
dump_stack();
|
printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__);
|
||||||
|
dump_stack();
|
||||||
|
}
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user