Skip to content

Commit 7d8ed16

Browse files
RichardWeiYangrppt
authored andcommitted
memblock tests: fix undefined reference to `early_pfn_to_nid'
commit 6a9531c ("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: Wei Yang <[email protected]> CC: Yajun Deng <[email protected]> CC: Mike Rapoport <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport (IBM) <[email protected]>
1 parent 39cd87c commit 7d8ed16

File tree

1 file changed

+5
-0
lines changed
  • tools/include/linux

1 file changed

+5
-0
lines changed

tools/include/linux/mm.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count)
3737
{
3838
}
3939

40+
static inline int early_pfn_to_nid(unsigned long pfn)
41+
{
42+
return 0;
43+
}
44+
4045
#endif

0 commit comments

Comments
 (0)