PERFORCE change 191578 for review

John Baldwin jhb at FreeBSD.org
Sat Apr 16 03:46:59 UTC 2011


http://p4web.freebsd.org/@@191578?ac=10

Change 191578 by jhb at jhb_fiver on 2011/04/16 03:46:09

	Make bus number code conditional on PCI_RES_BUS, not NEW_PCIB.

Affected files ...

.. //depot/projects/pci/sys/dev/pci/pci_domain.c#2 edit
.. //depot/projects/pci/sys/x86/x86/nexus.c#5 edit

Differences ...

==== //depot/projects/pci/sys/dev/pci/pci_domain.c#2 (text+ko) ====

@@ -141,7 +141,9 @@
 
 	hr->hr_pcib = pcib;
 	resource_list_init(&hr->hr_rl);
+#ifdef PCI_RES_BUS
 	pcib_host_res_init_rman(hr, &hr->hr_bus_rman, 0, 255, "bus numbers");
+#endif
 	pcib_host_res_init_rman(hr, &hr->hr_io_rman, 0, 0xffffffff,
 	    "I/O ports");
 	pcib_host_res_init_rman(hr, &hr->hr_mem_rman, 0, ~0ul, "memory");
@@ -164,11 +166,13 @@
 		device_printf(pcib, "I/O port resources busy\n");
 		return (error);
 	}
+#ifdef PCI_RES_BUS
 	error = rman_fini(&hr->hr_bus_rman);
 	if (error) {
 		device_printf(pcib, "bus numbers busy\n");
 		return (error);
 	}
+#endif
 
 	/*
 	 * Release all allocated resources and remove them from the
@@ -194,8 +198,10 @@
 		return (&hr->hr_io_rman);
 	case SYS_RES_MEMORY:
 		return (&hr->hr_mem_rman);
+#ifdef PCI_RES_BUS
 	case PCI_RES_BUS:
 		return (&hr->hr_bus_rman);
+#endif
 	default:
 		return (NULL);
 	}

==== //depot/projects/pci/sys/x86/x86/nexus.c#5 (text+ko) ====

@@ -385,7 +385,7 @@
 		count = rle->count;
 	}
 
-#ifdef NEW_PCIB
+#ifdef PCI_RES_BUS
 	if (type == PCI_RES_BUS) {
 		/*
 		 * PCI bus number resources are allocated from a
@@ -428,7 +428,7 @@
 {
 	struct rman *rm;
 
-#ifdef NEW_PCIB
+#ifdef PCI_RES_BUS
 	if (type == PCI_RES_BUS)
 		return (pci_domain_adjust_bus(pcib_get_domain(child), child, r,
 		    start, end));
@@ -517,7 +517,7 @@
 		       struct resource *r)
 {
 
-#ifdef NEW_PCIB
+#ifdef PCI_RES_BUS
 	if (type == PCI_RES_BUS) {
 		return (pci_domain_release_bus(pcib_get_domain(child), child,
 		    rid, r));


More information about the p4-projects mailing list