Re: [PATCH -V2] tdx, memory hotplug: Check whole hot-adding memory range for TDX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  extern u64 max_mem_size;
extern int mhp_online_type_from_str(const char *str);
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 621ae1015106..c4769f24b1e2 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1305,6 +1305,11 @@ int try_online_node(int nid)
  	return ret;
  }
+int __weak arch_check_hotplug_memory_range(u64 start, u64 size)
+{
+	return 0;
+}

BTW, I remember that "__weak" doesn't always behave the way it would seem, which is the reason we're usually using

#define arch_check_hotplug_memory_range arch_check_hotplug_memory_range

#ifndef arch_check_hotplug_memory_range
...
#endif


Not that I remember the details, just that it can result in rather surprising outcomes (e.g., the wrong function getting called).

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux