Thread (24 messages) flat view 24 messages, 4 authors, 2020-03-16

Re: [PATCH v1 4/5] mm/memory_hotplug: convert memhp_auto_online to store an online_type

From: Michal Hocko <mhocko@kernel.org>
Date: 2020-03-16 15:25:04
Also in: linux-hyperv, linux-mm, lkml

On Wed 11-03-20 13:30:25, David Hildenbrand wrote:
[...]
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
index d6d64f8718e6..e15a600cfa4d 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -235,7 +235,7 @@ static int memtrace_online(void)
 		 * If kernel isn't compiled with the auto online option
 		 * we need to online the memory ourselves.
 		 */
-		if (!memhp_auto_online) {
+		if (memhp_default_online_type == MMOP_OFFLINE) {
 			lock_device_hotplug();
 			walk_memory_blocks(ent->start, ent->size, NULL,
 					   online_mem_block);
Whut? This stinks, doesn't it. For your defense, the original code is
fishy already but this just makes it even more ugly.
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help