summaryrefslogtreecommitdiffstats
path: root/cpukit/include/libfdt.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-05-09 19:41:22 +1000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-02 07:52:20 +0100
commitb00040b273a1d72676c80f34a7a4ca6e857ed32b (patch)
tree6693ec52a04e83365a62e0f2a37f662f6f11246e /cpukit/include/libfdt.h
parentlibfdt: Introduce fdt_create_with_flags() (diff)
downloadrtems-b00040b273a1d72676c80f34a7a4ca6e857ed32b.tar.bz2
libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed
Searching for duplicate names scales O(n^2) with the number of names added to a fdt, which can cause a noticable slowdown with larger device trees and very slow CPU cores. Add FDT_CREATE_FLAG_NO_NAME_DEDUP that allow the caller to trade fdt size for speed in the creation process. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190509094122.834-4-npiggin@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/include/libfdt.h')
-rw-r--r--cpukit/include/libfdt.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h
index c2dee3eaa6..0684ec22ed 100644
--- a/cpukit/include/libfdt.h
+++ b/cpukit/include/libfdt.h
@@ -1433,7 +1433,13 @@ int fdt_nop_node(void *fdt, int nodeoffset);
/* Sequential write functions */
/**********************************************************************/
-#define FDT_CREATE_FLAGS_ALL 0
+/* fdt_create_with_flags flags */
+#define FDT_CREATE_FLAG_NO_NAME_DEDUP 0x1
+ /* FDT_CREATE_FLAG_NO_NAME_DEDUP: Do not try to de-duplicate property
+ * names in the fdt. This can result in faster creation times, but
+ * a larger fdt. */
+
+#define FDT_CREATE_FLAGS_ALL (FDT_CREATE_FLAG_NO_NAME_DEDUP)
/**
* fdt_create_with_flags - begin creation of a new fdt