]> git.baikalelectronics.ru Git - kernel.git/commit
Fix assertion failure with MSI on sparc64
authorDavid Miller <davem@davemloft.net>
Fri, 11 May 2007 20:26:44 +0000 (13:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 23:01:18 +0000 (16:01 -0700)
commit89cc10100e40507b45097033b69a63c742be7546
treebbace1c3424507cc1e6008e7f21dc2eba1332b47
parent2966c419fa33528527c1a20430422fe9dfc165f7
Fix assertion failure with MSI on sparc64

Today's find is a triggered assertion in msi_free_irqs() when the system
doesn't support MSI, in which case arch_setup_msi_irqs() always returns
an error.

The problem is that when this happens we branch into msi_free_irqs(), to
which you added the following assertion loop:

list_for_each_entry(entry, &dev->msi_list, list)
BUG_ON(irq_has_action(entry->irq));

Well, if arch_setup_msi_irqs() fails, entry->irq will be zero and
although that's never assigned to any normal devices we use that IRQ
number for the timer interrupt on sparc64 so this assertion triggers.

Better to test for zero before doing the irq_has_action() assertion
thing.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/msi.c