svn commit: r292579 - head/sys/dev/ofw

Ian Lepore ian at FreeBSD.org
Tue Dec 22 00:53:20 UTC 2015


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;


More information about the svn-src-all mailing list