aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2024-04-02 13:26:59 +0000
committerMike Rapoport (IBM) <[email protected]>2024-04-04 11:08:32 +0300
commit7d8ed162e6a92268d4b2b84d364a931216102c8e (patch)
tree63216996ec82891b93c6c62ec3b922716ebd9f19
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
memblock tests: fix undefined reference to `early_pfn_to_nid'
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 <[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]>
-rw-r--r--tools/include/linux/mm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
index f3c82ab5b14c..7d73da098047 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