From: David Hildenbrand <david@redhat.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org,
xen-devel@lists.xenproject.org, devel@linuxdriverproject.org,
David Hildenbrand <david@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Rashmica Gupta <rashmica.g@gmail.com>,
Balbir Singh <bsingharora@gmail.com>,
Michael Neuling <mikey@neuling.org>
Subject: [PATCH v1 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online()
Date: Tue, 18 Sep 2018 13:48:20 +0200 [thread overview]
Message-ID: <20180918114822.21926-5-david@redhat.com> (raw)
In-Reply-To: <20180918114822.21926-1-david@redhat.com>
device_online() should be called with device_hotplug_lock() held.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Rashmica Gupta <rashmica.g@gmail.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Michael Neuling <mikey@neuling.org>
Reviewed-by: Pavel Tatashin <pavel.tatashin@microsoft.com>
Signed-off-by: David Hildenbrand <david@redhat.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 8f1cd4f3bfd5..ef7181d4fe68 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -229,9 +229,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
next prev parent reply other threads:[~2018-09-18 11:48 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 11:48 [PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` [PATCH v1 1/6] mm/memory_hotplug: make remove_memory() take the device_hotplug_lock David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 21:18 ` Rafael J. Wysocki
2018-09-18 21:18 ` Rafael J. Wysocki
2018-09-18 21:18 ` Rafael J. Wysocki
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` [PATCH v1 2/6] mm/memory_hotplug: make add_memory() " David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 21:19 ` Rafael J. Wysocki
2018-09-18 21:19 ` Rafael J. Wysocki
2018-09-18 21:19 ` Rafael J. Wysocki
2018-09-18 11:48 ` [PATCH v1 3/6] mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` [PATCH v1 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online() David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand [this message]
2018-09-18 11:48 ` [PATCH v1 5/6] powerpc/powernv: hold device_hotplug_lock in memtrace_offline_pages() David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-18 11:48 ` [PATCH v1 6/6] memory-hotplug.txt: Add some details about locking internals David Hildenbrand
2018-09-18 11:48 ` David Hildenbrand
2018-09-19 1:22 ` [PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock Balbir Singh
2018-09-19 1:22 ` Balbir Singh
2018-09-19 7:35 ` David Hildenbrand
2018-09-19 7:35 ` David Hildenbrand
2018-09-19 7:35 ` David Hildenbrand
2018-09-23 2:34 ` Balbir Singh
2018-09-23 2:34 ` Balbir Singh
2018-09-23 2:34 ` Balbir Singh
2018-09-19 1:22 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180918114822.21926-5-david@redhat.com \
--to=david@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=devel@linuxdriverproject.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rashmica.g@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.