aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Xinpeng <[email protected]>2022-07-27 18:07:33 +0800
committerMike Rapoport <[email protected]>2022-07-29 09:34:50 +0300
commit0a7e91528202bec8e8dc5787c7568e6c60ce7f43 (patch)
treed3e37175c6280eaa5c1b4ee6a02144261f787fb2
parent06c8580aa23ddc9b1c37b9c7c5e2cc504e460207 (diff)
memblock tests: fix compilation errors
Do 'make -C tools/testing/memblock', get the following errors: 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' Fixes: 902c2d91582c ("memblock: Disable mirror feature if kernelcore is not specified") Fixes: 14d9a675fd0d ("mm: Ratelimited mirrored memory related warning messages") Signed-off-by: Liu Xinpeng <[email protected]> Tested-by: Ma Wupeng <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--tools/testing/memblock/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h
index c2a492c05e0c..fdb7f5db7308 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,