Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23218
b: refs/heads/master
c: 309e57d
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 4a36caf commit ff18e51
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5eeca8e688b6affba4cd85262152fdd1b274ad33
refs/heads/master: 309e57df7b766172ba137a8cbd909f88dd76e8e9
4 changes: 4 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ restrictions referred to are that the relevant option is valid if:
MCA MCA bus support is enabled.
MDA MDA console support is enabled.
MOUSE Appropriate mouse support is enabled.
MSI Message Signaled Interrupts (PCI).
MTD MTD support is enabled.
NET Appropriate network support is enabled.
NUMA NUMA support is enabled.
Expand Down Expand Up @@ -1152,6 +1153,9 @@ running once the system is up.
Mechanism 2.
nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
Configuration
nomsi [MSI] If the PCI_MSI kernel config parameter is
enabled, this kernel boot option can be used to
disable the use of MSI interrupts system-wide.
nosort [IA-32] Don't sort PCI devices according to
order given by the PCI BIOS. This sorting is
done to get a device order compatible with
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ config PCI_MSI
generate an interrupt using an inbound Memory Write on its
PCI bus instead of asserting a device IRQ pin.

Use of PCI MSI interrupts can be disabled at kernel boot time
by using the 'pci=nomsi' option. This disables MSI for the
entire system.

If you don't know what to do here, say N.

config PCI_DEBUG
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,11 @@ void pci_disable_msi(struct pci_dev* dev)
u16 control;
unsigned long flags;

if (!pci_msi_enable)
return;
if (!dev)
return;

pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
if (!pos)
return;
Expand Down Expand Up @@ -1026,6 +1029,8 @@ void pci_disable_msix(struct pci_dev* dev)
int pos, temp;
u16 control;

if (!pci_msi_enable)
return;
if (!dev)
return;

Expand Down Expand Up @@ -1152,6 +1157,11 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev)
}
}

void pci_no_msi(void)
{
pci_msi_enable = 0;
}

EXPORT_SYMBOL(pci_enable_msi);
EXPORT_SYMBOL(pci_disable_msi);
EXPORT_SYMBOL(pci_enable_msix);
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str)
if (k)
*k++ = 0;
if (*str && (str = pcibios_setup(str)) && *str) {
/* PCI layer options should be handled here */
printk(KERN_ERR "PCI: Unknown option `%s'\n", str);
if (!strcmp(str, "nomsi")) {
pci_no_msi();
} else {
printk(KERN_ERR "PCI: Unknown option `%s'\n",
str);
}
}
str = k;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ extern int pci_msi_quirk;

#ifdef CONFIG_PCI_MSI
void disable_msi_mode(struct pci_dev *dev, int pos, int type);
void pci_no_msi(void);
#else
static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
static inline void pci_no_msi(void) { }
#endif

extern int pcie_mch_quirk;
Expand Down

0 comments on commit ff18e51

Please sign in to comment.