From owner-svn-src-all@FreeBSD.ORG Tue Jun 19 15:15:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E661065674; Tue, 19 Jun 2012 15:15:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3D368FC23; Tue, 19 Jun 2012 15:15:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JFFZ6E052405; Tue, 19 Jun 2012 15:15:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5JFFZDk052403; Tue, 19 Jun 2012 15:15:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206191515.q5JFFZDk052403@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jun 2012 15:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237271 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 15:15:36 -0000 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;