diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-02-07 23:28:17 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-02-10 17:19:39 -0500 |
commit | a91e4f12ffc42fa019b5a66eaa8702f5e0f08a6a (patch) | |
tree | 0ba9972be60c1f4fed5780a6e676e592848e0f27 /tools | |
parent | f61872bb58a1cd8f0422aab1940eeee8be579d38 (diff) |
bootconfig: Allocate xbc_nodes array dynamically
To reduce the large static array from kernel data, allocate
xbc_nodes array dynamically only if the kernel loads a
bootconfig.
Note that this also add dummy memblock.h for user-spacae
bootconfig tool.
Link: http://lkml.kernel.org/r/158108569699.3187.6512834527603883707.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bootconfig/include/linux/memblock.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/bootconfig/include/linux/memblock.h b/tools/bootconfig/include/linux/memblock.h new file mode 100644 index 000000000000..7862f217d85d --- /dev/null +++ b/tools/bootconfig/include/linux/memblock.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _XBC_LINUX_MEMBLOCK_H +#define _XBC_LINUX_MEMBLOCK_H + +#include <stdlib.h> + +#define __pa(addr) (addr) +#define SMP_CACHE_BYTES 0 +#define memblock_alloc(size, align) malloc(size) +#define memblock_free(paddr, size) free(paddr) + +#endif |