Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2018 01:09:31 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330754 - head/sys/powerpc/ofw
Message-ID:  <201803110109.w2B19V9c088240@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 	} 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803110109.w2B19V9c088240>