Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb3576fa authored by Gary Hade's avatar Gary Hade Committed by Greg Kroah-Hartman
Browse files

PCI: Include PCI domain in PCI bus names on x86/x86_64



The PCI bus names included in /proc/iomem and /proc/ioports are
of the form 'PCI Bus #XX' where XX is the bus number.  This patch
changes the naming to 'PCI Bus XXXX:YY' where XXXX is the domain
number and YY is the bus number.  For example, PCI bus 14 in
domain 0 will show as 'PCI Bus 0000:14' instead of 'PCI Bus #14'.
This change makes the naming consistent with other architectures
such as ia64 where multiple PCI domain support has been around
longer.

Signed-off-by: default avatarGary Hade <garyhade@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 21c68474
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -151,7 +151,7 @@ adjust_transparent_bridge_resources(struct pci_bus *bus)


static void
static void
get_current_resources(struct acpi_device *device, int busnum,
get_current_resources(struct acpi_device *device, int busnum,
			struct pci_bus *bus)
			int domain, struct pci_bus *bus)
{
{
	struct pci_root_info info;
	struct pci_root_info info;
	size_t size;
	size_t size;
@@ -168,10 +168,10 @@ get_current_resources(struct acpi_device *device, int busnum,
	if (!info.res)
	if (!info.res)
		goto res_alloc_fail;
		goto res_alloc_fail;


	info.name = kmalloc(12, GFP_KERNEL);
	info.name = kmalloc(16, GFP_KERNEL);
	if (!info.name)
	if (!info.name)
		goto name_alloc_fail;
		goto name_alloc_fail;
	sprintf(info.name, "PCI Bus #%02x", busnum);
	sprintf(info.name, "PCI Bus %04x:%02x", domain, busnum);


	info.res_num = 0;
	info.res_num = 0;
	acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
	acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
@@ -247,7 +247,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
#endif
#endif


	if (bus && (pci_probe & PCI_USE__CRS))
	if (bus && (pci_probe & PCI_USE__CRS))
		get_current_resources(device, busnum, bus);
		get_current_resources(device, busnum, domain, bus);
	
	
	return bus;
	return bus;
}
}
+3 −1
Original line number Original line Diff line number Diff line
@@ -631,7 +631,9 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
		pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
		pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
	}
	}


	sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number);
	sprintf(child->name,
		(is_cardbus ? "PCI CardBus %04x:%02x" : "PCI Bus %04x:%02x"),
		pci_domain_nr(bus), child->number);


	/* Has only triggered on CardBus, fixup is in yenta_socket */
	/* Has only triggered on CardBus, fixup is in yenta_socket */
	while (bus->parent) {
	while (bus->parent) {