Date: Tue, 22 Dec 2015 00:53:19 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292579 - head/sys/dev/ofw Message-ID: <201512220053.tBM0rJ7K072947@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512220053.tBM0rJ7K072947>