svn commit: r330754 - head/sys/powerpc/ofw

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun Mar 11 01:09:32 UTC 2018


Author: nwhitehorn
Date: Sun Mar 11 01:09:31 2018
New Revision: 330754
URL: https://svnweb.freebsd.org/changeset/base/330754

Log:
  Make FDT-using parts of ofw_machdep.c condition on options FDT. This fixes
  the kernel build when options FDT is absent.

Modified:
  head/sys/powerpc/ofw/ofw_machdep.c

Modified: head/sys/powerpc/ofw/ofw_machdep.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_machdep.c	Sun Mar 11 00:38:08 2018	(r330753)
+++ head/sys/powerpc/ofw/ofw_machdep.c	Sun Mar 11 01:09:31 2018	(r330754)
@@ -223,6 +223,7 @@ parse_ofw_memory(phandle_t node, const char *prop, str
 	return (sz);
 }
 
+#ifdef FDT
 static int
 excise_fdt_reserved(struct mem_region *avail, int asz)
 {
@@ -310,6 +311,7 @@ excise_fdt_reserved(struct mem_region *avail, int asz)
 
 	return (asz);
 }
+#endif
 
 /*
  * This is called during powerpc_init, before the system is really initialized.
@@ -348,9 +350,11 @@ ofw_mem_regions(struct mem_region *memp, int *memsz,
 		asz += res/sizeof(struct mem_region);
 	}
 
+#ifdef FDT
 	phandle = OF_finddevice("/chosen");
 	if (OF_hasprop(phandle, "fdtmemreserv"))
 		asz = excise_fdt_reserved(availp, asz);
+#endif
 
 	*memsz = msz;
 	*availsz = asz;
@@ -409,6 +413,7 @@ OF_bootstrap()
 	} else
 #endif
 	if (fdt != NULL) {
+#ifdef FDT
 #ifdef AIM
 		bus_space_tag_t fdt_bt;
 		vm_offset_t tmp_fdt_ptr;
@@ -445,6 +450,7 @@ OF_bootstrap()
 		err = OF_init((void *)fdt_va);
 #else
 		err = OF_init(fdt);
+#endif
 #endif
 	} 
 


More information about the svn-src-all mailing list