aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-common.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-02 10:12:51 -0400
committerPaul Mackerras <paulus@samba.org>2008-11-05 06:08:27 -0500
commit1fd0f52583a85b21a394201b007bc1ee104b235d (patch)
tree1141c75f26c8a44129a238e61b4b6906e3975038 /arch/powerpc/kernel/pci-common.c
parent454666eb78d890f5740ea1901f8b01a43c77c67c (diff)
powerpc: Fix domain numbers in /proc on 64-bit
The code to properly expose domain numbers in /proc is somewhat bogus on ppc64 as it depends on the "buid" field being non-0, but that field is really pseries specific. This removes that code and makes ppc64 use the same code as 32-bit which effectively decides whether to expose domains based on ppc_pci_flags set by the platform, and sets the default for 64-bit to enable domains and enable compatibility for domain 0 (which strips the domain number for domain 0 to help with X servers). 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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index f36936d9fda3..607b43191206 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -53,8 +53,9 @@ static int global_phb_number; /* Global phb counter */
53/* ISA Memory physical address */ 53/* ISA Memory physical address */
54resource_size_t isa_mem_base; 54resource_size_t isa_mem_base;
55 55
56/* Default PCI flags is 0 */ 56/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
57unsigned int ppc_pci_flags; 57unsigned int ppc_pci_flags = 0;
58
58 59
59static struct dma_mapping_ops *pci_dma_ops; 60static struct dma_mapping_ops *pci_dma_ops;
60 61
@@ -853,15 +854,12 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
853int pci_proc_domain(struct pci_bus *bus) 854int pci_proc_domain(struct pci_bus *bus)
854{ 855{
855 struct pci_controller *hose = pci_bus_to_host(bus); 856 struct pci_controller *hose = pci_bus_to_host(bus);
856#ifdef CONFIG_PPC64 857
857 return hose->buid != 0;
858#else
859 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS)) 858 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS))
860 return 0; 859 return 0;
861 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0) 860 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0)
862 return hose->global_number != 0; 861 return hose->global_number != 0;
863 return 1; 862 return 1;
864#endif
865} 863}
866 864
867void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 865void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,