svn commit: r296331 - in head/sys: mips/nlm mips/rmi powerpc/mpc85xx

Justin Hibbits jhibbits at FreeBSD.org
Thu Mar 3 01:12:15 UTC 2016


Author: jhibbits
Date: Thu Mar  3 01:12:13 2016
New Revision: 296331
URL: https://svnweb.freebsd.org/changeset/base/296331

Log:
  Let rman_init() initialize the default rman range.
  
  If rm_start and rm_end are both 0 on input to rman_init(), rman_init()
  pre-initializes them to the default range.  No need to set it before.

Modified:
  head/sys/mips/nlm/xlp_simplebus.c
  head/sys/mips/rmi/xlr_pci.c
  head/sys/powerpc/mpc85xx/lbc.c

Modified: head/sys/mips/nlm/xlp_simplebus.c
==============================================================================
--- head/sys/mips/nlm/xlp_simplebus.c	Thu Mar  3 01:09:00 2016	(r296330)
+++ head/sys/mips/nlm/xlp_simplebus.c	Thu Mar  3 01:12:13 2016	(r296331)
@@ -114,32 +114,24 @@ xlp_simplebus_init_resources(void)
 	    || rman_manage_region(&irq_rman, 0, 255))
 		panic("xlp_simplebus_init_resources irq_rman");
 
-	port_rman.rm_start = 0;
-	port_rman.rm_end = ~0ul;
 	port_rman.rm_type = RMAN_ARRAY;
 	port_rman.rm_descr = "I/O ports";
 	if (rman_init(&port_rman)
 	    || rman_manage_region(&port_rman, PCIE_IO_BASE, PCIE_IO_LIMIT))
 		panic("xlp_simplebus_init_resources port_rman");
 
-	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory";
 	if (rman_init(&mem_rman)
 	    || rman_manage_region(&mem_rman, PCIE_MEM_BASE, PCIE_MEM_LIMIT))
 		panic("xlp_simplebus_init_resources mem_rman");
 
-	pci_ecfg_rman.rm_start = 0;
-	pci_ecfg_rman.rm_end = ~0ul;
 	pci_ecfg_rman.rm_type = RMAN_ARRAY;
 	pci_ecfg_rman.rm_descr = "PCI ECFG IO";
 	if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman,
 	    PCI_ECFG_BASE, PCI_ECFG_LIMIT))
 		panic("xlp_simplebus_init_resources pci_ecfg_rman");
 
-	gbu_rman.rm_start = 0;
-	gbu_rman.rm_end = ~0ul;
 	gbu_rman.rm_type = RMAN_ARRAY;
 	gbu_rman.rm_descr = "Flash region";
 	if (rman_init(&gbu_rman)

Modified: head/sys/mips/rmi/xlr_pci.c
==============================================================================
--- head/sys/mips/rmi/xlr_pci.c	Thu Mar  3 01:09:00 2016	(r296330)
+++ head/sys/mips/rmi/xlr_pci.c	Thu Mar  3 01:12:13 2016	(r296331)
@@ -125,16 +125,12 @@ xlr_pci_init_resources(void)
 	    || rman_manage_region(&irq_rman, 0, 255))
 		panic("pci_init_resources irq_rman");
 
-	port_rman.rm_start = 0;
-	port_rman.rm_end = ~0ul;
 	port_rman.rm_type = RMAN_ARRAY;
 	port_rman.rm_descr = "I/O ports";
 	if (rman_init(&port_rman)
 	    || rman_manage_region(&port_rman, 0x10000000, 0x1fffffff))
 		panic("pci_init_resources port_rman");
 
-	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory";
 	if (rman_init(&mem_rman)

Modified: head/sys/powerpc/mpc85xx/lbc.c
==============================================================================
--- head/sys/powerpc/mpc85xx/lbc.c	Thu Mar  3 01:09:00 2016	(r296330)
+++ head/sys/powerpc/mpc85xx/lbc.c	Thu Mar  3 01:12:13 2016	(r296331)
@@ -511,8 +511,6 @@ lbc_attach(device_t dev)
 	rm = &sc->sc_rman;
 	rm->rm_type = RMAN_ARRAY;
 	rm->rm_descr = "Local Bus Space";
-	rm->rm_start = 0UL;
-	rm->rm_end = ~0UL;
 	error = rman_init(rm);
 	if (error)
 		goto fail;


More information about the svn-src-head mailing list