From: Bharat Kumar Gogada Date: Thu, 1 Sep 2016 10:14:46 +0000 (+0530) Subject: microblaze/PCI: Add multidomain support for procfs X-Git-Tag: v4.9-rc1~92^2~1^11 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9413d968f24371bede2c82ec7bb8d040eede8417;p=linux.git microblaze/PCI: Add multidomain support for procfs We create a procfs directory for every PCI bus. Previously, the directory name was just the bus number, so using the same bus number in different domains caused a kernel crash when we tried to create a duplicate directory. Make pci_proc_domain() return the domain number, so procfs directories for buses in domain 0 are named with just the bus number, and directories for buses in other domains include both the domain number and the bus number. [bhelgaas: changelog] Signed-off-by: Bharat Kumar Gogada Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek --- diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 81556b843a8e..7f696f97f9dd 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -632,10 +632,10 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose, } } -/* Decide whether to display the domain number in /proc */ +/* Display the domain number in /proc */ int pci_proc_domain(struct pci_bus *bus) { - return 0; + return pci_domain_nr(bus); } /* This header fixup will do the resource fixup for all devices as they are