Author: jhb Date: Tue Jun 19 15:15:35 2012 New Revision: 237271 URL: http://svn.freebsd.org/changeset/base/237271
Log: Fix another off-by-one error in the previous fix so that the new start address is properly aligned. While here, use a simpler expression to align the new end address that we use elsewhere for aligning the end. Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Tue Jun 19 14:47:07 2012 (r237270) +++ head/sys/dev/pci/pci_pci.c Tue Jun 19 15:15:35 2012 (r237271) @@ -913,7 +913,7 @@ pcib_grow_window(struct pcib_softc *sc, if (bootverbose) printf("\tfront candidate range: %#lx-%#lx\n", front, end_free); - front &= ~(1ul << w->step) - 1; + front &= ~((1ul << w->step) - 1); front = rman_get_start(w->res) - front; } else front = 0; @@ -941,7 +941,7 @@ pcib_grow_window(struct pcib_softc *sc, if (bootverbose) printf("\tback candidate range: %#lx-%#lx\n", start_free, back); - back = roundup2(back + 1, 1ul << w->step) - 1; + back |= (1ul << w->step) - 1; back -= rman_get_end(w->res); } else back = 0; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"