[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180925091457.28651-5-david@redhat.com>
Date: Tue, 25 Sep 2018 11:14:55 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-acpi@...r.kernel.org,
xen-devel@...ts.xenproject.org, devel@...uxdriverproject.org,
David Hildenbrand <david@...hat.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Rashmica Gupta <rashmica.g@...il.com>,
Balbir Singh <bsingharora@...il.com>,
Michael Neuling <mikey@...ling.org>
Subject: [PATCH v2 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online()
device_online() should be called with device_hotplug_lock() held.
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Rashmica Gupta <rashmica.g@...il.com>
Cc: Balbir Singh <bsingharora@...il.com>
Cc: Michael Neuling <mikey@...ling.org>
Reviewed-by: Pavel Tatashin <pavel.tatashin@...rosoft.com>
Reviewed-by: Rashmica Gupta <rashmica.g@...il.com>
Signed-off-by: David Hildenbrand <david@...hat.com>
---
arch/powerpc/platforms/powernv/memtrace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
index 773623f6bfb1..fdd48f1a39f7 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -242,9 +242,11 @@ static int memtrace_online(void)
* we need to online the memory ourselves.
*/
if (!memhp_auto_online) {
+ lock_device_hotplug();
walk_memory_range(PFN_DOWN(ent->start),
PFN_UP(ent->start + ent->size - 1),
NULL, online_mem_block);
+ unlock_device_hotplug();
}
/*
--
2.17.1
Powered by blists - more mailing lists