linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Bringmann <mwb@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Michael Bringmann <mwb@linux.vnet.ibm.com>,
	Nathan Fontenot <nfont@linux.vnet.ibm.com>,
	John Allen <jallen@linux.vnet.ibm.com>,
	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Subject: [RFC v5 3/6] migration/dlpar: Add device readd queuing function
Date: Mon, 21 May 2018 12:52:36 -0500	[thread overview]
Message-ID: <a44f908b-03f9-9042-afaa-2a8bb593db4b@linux.vnet.ibm.com> (raw)
In-Reply-To: <6add12e8-acf9-228e-fa04-80e38dbb8f7c@linux.vnet.ibm.com>

migration/dlpar: This patch adds function dlpar_readd_action()
which will queue a worker function to 'readd' a device in the
system.  Such devices must be identified by a 'resource' type
and a drc_index to be readded.

Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/dlpar.c   |   14 ++++++++++++++
 arch/powerpc/platforms/pseries/pseries.h |    1 +
 2 files changed, 15 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index a0b20c0..a14684e 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -407,6 +407,20 @@ void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
 	}
 }
 
+int dlpar_queue_action(int resource, int action, u32 drc_index)
+{
+	struct pseries_hp_errorlog hp_elog;
+
+	hp_elog.resource = resource;
+	hp_elog.action = action;
+	hp_elog.id_type = PSERIES_HP_ELOG_ID_DRC_INDEX;
+	hp_elog._drc_u.drc_index = drc_index;
+
+	queue_hotplug_event(&hp_elog, NULL, NULL);
+
+	return 0;
+}
+
 static int dlpar_parse_resource(char **cmd, struct pseries_hp_errorlog *hp_elog)
 {
 	char *arg;
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 60db2ee..cb2beb1 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -61,6 +61,7 @@ extern struct device_node *dlpar_configure_connector(__be32,
 
 void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
 			 struct completion *hotplug_done, int *rc);
+extern int dlpar_queue_action(int resource, int action, u32 drc_index);
 #ifdef CONFIG_MEMORY_HOTPLUG
 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
 #else

  parent reply	other threads:[~2018-05-21 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 17:51 [RFC v5 0/6] powerpc/hotplug: Fix affinity assoc for LPAR migration Michael Bringmann
2018-05-21 17:52 ` [RFC v5 1/6] powerpc/drmem: Export 'dynamic-memory' loader Michael Bringmann
2018-05-21 17:52 ` [RFC v5 2/6] powerpc/cpu: Conditionally acquire/release DRC index Michael Bringmann
2018-05-22 20:17   ` Nathan Fontenot
2018-05-22 23:46     ` Michael Bringmann
2018-05-21 17:52 ` Michael Bringmann [this message]
2018-05-22 20:24   ` [RFC v5 3/6] migration/dlpar: Add device readd queuing function Thomas Falcon
2018-05-22 23:49     ` Michael Bringmann
2018-05-21 17:52 ` [RFC v5 4/6] powerpc/dlpar: Provide CPU readd operation Michael Bringmann
2018-05-21 17:52 ` [RFC v5 5/6] powerpc/mobility: Add lock/unlock device hotplug Michael Bringmann
2018-05-21 17:52 ` [RFC v5 6/6] migration/memory: Update memory for assoc changes Michael Bringmann
2018-05-22 21:11   ` Thomas Falcon
2018-05-22 23:54     ` Michael Bringmann
2018-05-22 23:36 [RFC v6 0/6] powerpc/hotplug: Fix affinity assoc for LPAR migration Michael Bringmann
2018-05-22 23:36 ` [RFC v5 3/6] migration/dlpar: Add device readd queuing function Michael Bringmann

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=a44f908b-03f9-9042-afaa-2a8bb593db4b@linux.vnet.ibm.com \
    --to=mwb@linux.vnet.ibm.com \
    --cc=jallen@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=tlfalcon@linux.vnet.ibm.com \
    --cc=tyreld@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).