Commit 7d8ed162 authored by Wei Yang's avatar Wei Yang Committed by Mike Rapoport (IBM)

memblock tests: fix undefined reference to `early_pfn_to_nid'

commit 6a9531c3 ("memblock: fix crash when reserved memory is not
added to memory") introduce the usage of early_pfn_to_nid, which is not
defined in memblock tests.

The original definition of early_pfn_to_nid is defined in mm.h, so let
add this in the corresponding mm.h.
Signed-off-by: default avatarWei Yang <richard.weiyang@gmail.com>
CC: Yajun Deng <yajun.deng@linux.dev>
CC: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/20240402132701.29744-2-richard.weiyang@gmail.comSigned-off-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
parent 39cd87c4
......@@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count)
{
}
static inline int early_pfn_to_nid(unsigned long pfn)
{
return 0;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment