From owner-svn-src-head@freebsd.org Tue Dec 22 00:53:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D05419D59E7; Tue, 22 Dec 2015 00:53:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A14F21980; Tue, 22 Dec 2015 00:53:20 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBM0rJW2072948; Tue, 22 Dec 2015 00:53:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBM0rJ7K072947; Tue, 22 Dec 2015 00:53:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201512220053.tBM0rJ7K072947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 22 Dec 2015 00:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292579 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 00:53:20 -0000 Author: ian Date: Tue Dec 22 00:53:19 2015 New Revision: 292579 URL: https://svnweb.freebsd.org/changeset/base/292579 Log: Fix the detection of IO/memory space changing across busses when the bus is not pci (and thus where, ironically, the whole situation is meaningless). This was not an error in the original code, it was introduced during my refactoring to commonize the routine. A small change a few lines above drove the need to make this change, and the error didn't show up on the platforms I initially tested with. Modified: head/sys/dev/ofw/ofw_subr.c Modified: head/sys/dev/ofw/ofw_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_subr.c Tue Dec 22 00:43:22 2015 (r292578) +++ head/sys/dev/ofw/ofw_subr.c Tue Dec 22 00:53:19 2015 (r292579) @@ -137,9 +137,8 @@ ofw_reg_to_paddr(phandle_t dev, int regn res /= sizeof(cell[0]); regno = 0; while (regno < res) { - rspc = (pci) - ? cell[regno] & OFW_PCI_PHYS_HI_SPACEMASK - : OFW_PADDR_NOT_PCI; + rspc = (pci ? cell[regno] : OFW_PADDR_NOT_PCI) & + OFW_PCI_PHYS_HI_SPACEMASK; if (rspc != spc) { regno += naddr + nbridge + nsize; continue;