Skip to content

Commit

Permalink
memblock tests: set memblock_debug to enable memblock_dbg() messages
Browse files Browse the repository at this point in the history
If Memblock simulator was compiled with MEMBLOCK_DEBUG=1, set
memblock_debug to 1 so that memblock_dbg() will print debug information
when memblock functions are tested in Memblock simulator.

Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/aee4200cce1c09992ed055006a81fde1b6b5b567.1656907314.git.remckee0@gmail.com
  • Loading branch information
Rebecca Mckeever authored and Mike Rapoport committed Jul 4, 2022
1 parent 76586c0 commit c55b31a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/testing/memblock/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#ifndef _MM_INTERNAL_H
#define _MM_INTERNAL_H

/*
* Enable memblock_dbg() messages
*/
#ifdef MEMBLOCK_DEBUG
static int memblock_debug = 1;
#endif

struct page {};

void memblock_free_pages(struct page *page, unsigned long pfn,
Expand Down

0 comments on commit c55b31a

Please sign in to comment.