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

Commit b918c62e authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas
Browse files

PCI: replace struct pci_bus secondary/subordinate with busn_res



Replace the struct pci_bus secondary/subordinate members with the
struct resource busn_res.  Later we'll build a resource tree of these
bus numbers.

[bhelgaas: changelog]
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 92f02430
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ common_init_pci(void)
					hose, &resources);
		hose->bus = bus;
		hose->need_domain_info = need_domain_info;
		next_busno = bus->subordinate + 1;
		next_busno = bus->busn_res.end + 1;
		/* Don't allow 8-bit bus number overflow inside the hose -
		   reserve some space for bridges. */ 
		if (next_busno > 224) {
+1 −1
Original line number Diff line number Diff line
@@ -461,7 +461,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
			if (!sys->bus)
				panic("PCI: unable to scan bus!");

			busnr = sys->bus->subordinate + 1;
			busnr = sys->bus->busn_res.end + 1;

			list_add(&sys->node, head);
		} else {
+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
		return NULL;
	}

	pbus->subordinate = pci_scan_child_bus(pbus);
	pbus->busn_res.end = pci_scan_child_bus(pbus);
	return pbus;

out3:
+2 −2
Original line number Diff line number Diff line
@@ -1506,10 +1506,10 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose)
		pci_free_resource_list(&resources);
		return;
	}
	bus->secondary = hose->first_busno;
	bus->busn_res.start = hose->first_busno;
	hose->bus = bus;

	hose->last_busno = bus->subordinate;
	hose->last_busno = bus->busn_res.end;
}

static int __init pcibios_init(void)
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
	need_domain_info = need_domain_info || hose->index;
	hose->need_domain_info = need_domain_info;
	if (bus) {
		next_busno = bus->subordinate + 1;
		next_busno = bus->busn_res.end + 1;
		/* Don't allow 8-bit bus number overflow inside the hose -
		   reserve some space for bridges. */
		if (next_busno > 224) {
Loading