diff mbox series

[v2] memblock tests: compiling error

Message ID 1658888438-20478-1-git-send-email-liuxp11@chinatelecom.cn (mailing list archive)
State New
Headers show
Series [v2] memblock tests: compiling error | expand

Commit Message

Liu Xinpeng July 27, 2022, 2:20 a.m. UTC
memblock.o: In function `memblock_find_in_range.constprop.9':
memblock.c:(.text+0x4651): undefined reference to `pr_warn_ratelimited'
memblock.o: In function `memblock_mark_mirror':
memblock.c:(.text+0x7171): undefined reference to `mirrored_kernelcore'

Fixs: commit 902c2d91582 ("memblock: Disable mirror feature if kernelcore
is not specified") and commit 14d9a675fd0 ("mm: Ratelimited mirrored memory
related warning")

Signed-off-by: Liu Xinpeng <liuxp11@chinatelecom.cn>
Tested-by: Ma Wupeng <mawupeng1@huawei.com>
---
 tools/testing/memblock/internal.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h
index c2a492c..fdb7f5d 100644
--- a/tools/testing/memblock/internal.h
+++ b/tools/testing/memblock/internal.h
@@ -9,6 +9,10 @@ 
 static int memblock_debug = 1;
 #endif
 
+#define pr_warn_ratelimited(fmt, ...)    printf(fmt, ##__VA_ARGS__)
+
+bool mirrored_kernelcore = false;
+
 struct page {};
 
 void memblock_free_pages(struct page *page, unsigned long pfn,