diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-12-20 14:54:49 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 16:18:08 +1100 |
commit | fa462f2d75e2437b5757069d3d7d27b1e50285cb (patch) | |
tree | dc872ff52a3225a3ef134105e74a528e5983fe8d /arch/powerpc/kernel/pci-common.c | |
parent | 853ad6c2e752215237e7fb26d681ed0008dd081a (diff) | |
download | blackbird-op-linux-fa462f2d75e2437b5757069d3d7d27b1e50285cb.tar.gz blackbird-op-linux-fa462f2d75e2437b5757069d3d7d27b1e50285cb.zip |
[POWERPC] pci32: Add platform option to enable /proc PCI domains
This adds flags the platforms can use to enable domain numbers
in /proc/bus/pci.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 9979c43cc8c7..68102ce7e438 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -639,3 +639,19 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, hose->mem_resources[memno-1] = tmp; } } + +/* Decide whether to display the domain number in /proc */ +int pci_proc_domain(struct pci_bus *bus) +{ + struct pci_controller *hose = pci_bus_to_host(bus); +#ifdef CONFIG_PPC64 + return hose->buid != 0; +#else + if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS)) + return 0; + if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0) + return hose->global_number != 0; + return 1; +#endif +} + |