提交 32a2eea7 编写于 作者: J Jeff Garzik 提交者: Greg Kroah-Hartman

PCI: Add 'nodomains' boot option, and pci_domains_supported global

* Introduce pci_domains_supported global, hardcoded to zero if
  !CONFIG_PCI_DOMAINS.

* Introduce 'nodomains' boot option, which clears pci_domains_supported
  on platforms that enable it by default (x86, x86-64, and others when
  they are converted to use this).
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 11949255
...@@ -1274,6 +1274,8 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -1274,6 +1274,8 @@ and is between 256 and 4096 characters. It is defined in the file
noaer [PCIE] If the PCIEAER kernel config parameter is noaer [PCIE] If the PCIEAER kernel config parameter is
enabled, this kernel boot option can be used to enabled, this kernel boot option can be used to
disable the use of PCIE advanced error reporting. disable the use of PCIE advanced error reporting.
nodomains [PCI] Disable support for multiple PCI
root domains (aka PCI segments, in ACPI-speak).
nommconf [X86-32,X86_64] Disable use of MMCONFIG for PCI nommconf [X86-32,X86_64] Disable use of MMCONFIG for PCI
Configuration Configuration
nomsi [MSI] If the PCI_MSI kernel config parameter is nomsi [MSI] If the PCI_MSI kernel config parameter is
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
unsigned int pci_pm_d3_delay = 10; unsigned int pci_pm_d3_delay = 10;
#ifdef CONFIG_PCI_DOMAINS
int pci_domains_supported = 1;
#endif
#define DEFAULT_CARDBUS_IO_SIZE (256) #define DEFAULT_CARDBUS_IO_SIZE (256)
#define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024) #define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024)
/* pci=cbmemsize=nnM,cbiosize=nn can override this */ /* pci=cbmemsize=nnM,cbiosize=nn can override this */
...@@ -1567,6 +1571,13 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) ...@@ -1567,6 +1571,13 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags)
return bars; return bars;
} }
static void __devinit pci_no_domains(void)
{
#ifdef CONFIG_PCI_DOMAINS
pci_domains_supported = 0;
#endif
}
static int __devinit pci_init(void) static int __devinit pci_init(void)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
...@@ -1588,6 +1599,8 @@ static int __devinit pci_setup(char *str) ...@@ -1588,6 +1599,8 @@ static int __devinit pci_setup(char *str)
pci_no_msi(); pci_no_msi();
} else if (!strcmp(str, "noaer")) { } else if (!strcmp(str, "noaer")) {
pci_no_aer(); pci_no_aer();
} else if (!strcmp(str, "nodomains")) {
pci_no_domains();
} else if (!strncmp(str, "cbiosize=", 9)) { } else if (!strncmp(str, "cbiosize=", 9)) {
pci_cardbus_io_size = memparse(str + 9, &str); pci_cardbus_io_size = memparse(str + 9, &str);
} else if (!strncmp(str, "cbmemsize=", 10)) { } else if (!strncmp(str, "cbmemsize=", 10)) {
......
...@@ -685,13 +685,16 @@ extern void pci_unblock_user_cfg_access(struct pci_dev *dev); ...@@ -685,13 +685,16 @@ extern void pci_unblock_user_cfg_access(struct pci_dev *dev);
* a PCI domain is defined to be a set of PCI busses which share * a PCI domain is defined to be a set of PCI busses which share
* configuration space. * configuration space.
*/ */
#ifndef CONFIG_PCI_DOMAINS #ifdef CONFIG_PCI_DOMAINS
extern int pci_domains_supported;
#else
enum { pci_domains_supported = 0 };
static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
static inline int pci_proc_domain(struct pci_bus *bus) static inline int pci_proc_domain(struct pci_bus *bus)
{ {
return 0; return 0;
} }
#endif #endif /* CONFIG_PCI_DOMAINS */
#else /* CONFIG_PCI is not enabled */ #else /* CONFIG_PCI is not enabled */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册