diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2024-04-02 13:26:59 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-17 11:56:06 +0200 |
commit | 701248485be3e109ce88845b0833df6f70840ea9 (patch) | |
tree | 3c7a6b364ed1fe25377e6c75c51afb57125b5fec | |
parent | e04539f513e72f892ea0590d00668e314cb78537 (diff) |
memblock tests: fix undefined reference to `early_pfn_to_nid'
[ Upstream commit 7d8ed162e6a92268d4b2b84d364a931216102c8e ]
commit 6a9531c3a880 ("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 <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.com
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | tools/include/linux/mm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index 43be27bcc897d..2f401e8c6c0bb 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -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 |