Skip to content

Commit

Permalink
memblock tests: fix compilation errors
Browse files Browse the repository at this point in the history
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 <liuxp11@chinatelecom.cn>
Tested-by: Ma Wupeng <mawupeng1@huawei.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/1658916453-26312-1-git-send-email-liuxp11@chinatelecom.cn
  • Loading branch information
Liu Xinpeng authored and Mike Rapoport committed Jul 29, 2022
1 parent 06c8580 commit 0a7e915
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/memblock/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0a7e915

Please sign in to comment.