[rtems commit] libfdt: Add support for disabling ordering check/fixup
Sebastian Huber
sebh at rtems.org
Mon Mar 2 06:52:34 UTC 2020
Module: rtems
Branch: master
Commit: 83cd34199aa80690e55958b07167d8809dfc4f83
Changeset: http://git.rtems.org/rtems/commit/?id=83cd34199aa80690e55958b07167d8809dfc4f83
Author: Simon Glass <sjg at chromium.org>
Date: Thu Feb 20 14:45:56 2020 -0700
libfdt: Add support for disabling ordering check/fixup
Add a way to remove this check and the reordering code, which is
unnecessary if the dtb is known to be correctly ordered.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: David Gibson <david at gibson.dropbear.id.au>
Message-Id: <20200220214557.176528-8-sjg at chromium.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
cpukit/dtc/libfdt/fdt_rw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpukit/dtc/libfdt/fdt_rw.c b/cpukit/dtc/libfdt/fdt_rw.c
index fe13671..1385425 100644
--- a/cpukit/dtc/libfdt/fdt_rw.c
+++ b/cpukit/dtc/libfdt/fdt_rw.c
@@ -435,7 +435,8 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize)
return struct_size;
}
- if (!fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
+ if (can_assume(LIBFDT_ORDER) |
+ !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
/* no further work necessary */
err = fdt_move(fdt, buf, bufsize);
if (err)
More information about the vc
mailing list