Skip to content

Commit 0a7e915

Browse files
liuxp11rppt
authored andcommitted
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: 902c2d9 ("memblock: Disable mirror feature if kernelcore is not specified") Fixes: 14d9a67 ("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]
1 parent 06c8580 commit 0a7e915

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/memblock/internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
static int memblock_debug = 1;
1010
#endif
1111

12+
#define pr_warn_ratelimited(fmt, ...) printf(fmt, ##__VA_ARGS__)
13+
14+
bool mirrored_kernelcore = false;
15+
1216
struct page {};
1317

1418
void memblock_free_pages(struct page *page, unsigned long pfn,

0 commit comments

Comments
 (0)