linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc/pseries: Add pseries hotplug queue and PowerVM/PowerKVM use cases
@ 2016-07-07 14:57 John Allen
  2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: John Allen @ 2016-07-07 14:57 UTC (permalink / raw)
  To: Nathan Fontenot, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

This series introduces a new workqueue for handling hotplug events. On
PowerKVM guests, this provides a work deferral mechanism to avoid
processing hotplug events in interrupt context. On PowerVM lpars, this
will be used to ensure that hotplug events initiated from the HMC and
from PRRN events are handled and serialized properly.

---

John Allen (3):
      powerpc/pseries: Add pseries hotplug workqueue
      powerpc/pseries: Add support for hotplug interrupt source
      powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events


 arch/powerpc/platforms/pseries/dlpar.c   |   57 +++++++++++++++++++++++++++++-
 arch/powerpc/platforms/pseries/pseries.h |    2 +
 arch/powerpc/platforms/pseries/ras.c     |   38 ++++++++++++++++++++
 3 files changed, 96 insertions(+), 1 deletion(-)

--
John Allen

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue
  2016-07-07 14:57 [PATCH 0/3] powerpc/pseries: Add pseries hotplug queue and PowerVM/PowerKVM use cases John Allen
@ 2016-07-07 15:00 ` John Allen
  2016-07-11 15:48   ` Nathan Fontenot
  2016-07-20  9:10   ` [1/3] " Michael Ellerman
  2016-07-07 15:03 ` [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source John Allen
  2016-07-07 15:05 ` [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events John Allen
  2 siblings, 2 replies; 8+ messages in thread
From: John Allen @ 2016-07-07 15:00 UTC (permalink / raw)
  To: Nathan Fontenot, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

In support of PAPR changes to add a new hotplug interrupt, introduce a
hotplug workqueue to avoid processing hotplug events in interrupt context.
We will also take advantage of the queue on PowerVM to ensure hotplug
events initiated from different sources (HMC and PRRN events) are handled
and serialized properly.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/dlpar.c |   52 ++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 2b93ae8..66a77d7 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -27,6 +27,15 @@
 #include <asm/uaccess.h>
 #include <asm/rtas.h>

+struct workqueue_struct *pseries_hp_wq;
+
+struct pseries_hp_work {
+	struct work_struct work;
+	struct pseries_hp_errorlog *errlog;
+	struct completion *hp_completion;
+	int *rc;
+};
+
 struct cc_workarea {
 	__be32	drc_index;
 	__be32	zero;
@@ -368,10 +377,51 @@ static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog)
 	return rc;
 }

+void pseries_hp_work_fn(struct work_struct *work)
+{
+	struct pseries_hp_work *hp_work =
+			container_of(work, struct pseries_hp_work, work);
+
+	if (hp_work->rc)
+		*(hp_work->rc) = handle_dlpar_errorlog(hp_work->errlog);
+	else
+		handle_dlpar_errorlog(hp_work->errlog);
+
+	if (hp_work->hp_completion)
+		complete(hp_work->hp_completion);
+
+	kfree(hp_work->errlog);
+	kfree((void *)work);
+}
+
+void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
+			 struct completion *hotplug_done, int *rc)
+{
+	struct pseries_hp_work *work;
+	struct pseries_hp_errorlog *hp_errlog_copy;
+
+	hp_errlog_copy = kmalloc(sizeof(struct pseries_hp_errorlog),
+				 GFP_KERNEL);
+	memcpy(hp_errlog_copy, hp_errlog, sizeof(struct pseries_hp_errorlog));
+
+	work = kmalloc(sizeof(struct pseries_hp_work), GFP_KERNEL);
+	if (work) {
+		INIT_WORK((struct work_struct *)work, pseries_hp_work_fn);
+		work->errlog = hp_errlog_copy;
+		work->hp_completion = hotplug_done;
+		work->rc = rc;
+		queue_work(pseries_hp_wq, (struct work_struct *)work);
+	} else {
+		*rc = -ENOMEM;
+		complete(hotplug_done);
+	}
+}
+
 static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
 			   const char *buf, size_t count)
 {
 	struct pseries_hp_errorlog *hp_elog;
+	struct completion hotplug_done;
 	const char *arg;
 	int rc;

@@ -450,6 +500,8 @@ static CLASS_ATTR(dlpar, S_IWUSR, NULL, dlpar_store);

 static int __init pseries_dlpar_init(void)
 {
+	pseries_hp_wq = alloc_workqueue("pseries hotplug workqueue",
+					WQ_UNBOUND, 1);
 	return sysfs_create_file(kernel_kobj, &class_attr_dlpar.attr);
 }
 machine_device_initcall(pseries, pseries_dlpar_init);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source
  2016-07-07 14:57 [PATCH 0/3] powerpc/pseries: Add pseries hotplug queue and PowerVM/PowerKVM use cases John Allen
  2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
@ 2016-07-07 15:03 ` John Allen
  2016-07-11 15:49   ` Nathan Fontenot
  2016-07-07 15:05 ` [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events John Allen
  2 siblings, 1 reply; 8+ messages in thread
From: John Allen @ 2016-07-07 15:03 UTC (permalink / raw)
  To: Nathan Fontenot, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

Add handler for new hotplug interrupt. For memory and CPU hotplug events,
we will add the hotplug errorlog to the hotplug workqueue. Since PCI
hotplug is not currently supported in the kernel, PCI hotplug events are
written to the rtas_log_bug and are handled by rtas_errd.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/pseries.h |    2 ++
 arch/powerpc/platforms/pseries/ras.c     |   38 ++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index ddb9aa5..bba3285 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -56,6 +56,8 @@ extern int dlpar_detach_node(struct device_node *);
 extern int dlpar_acquire_drc(u32 drc_index);
 extern int dlpar_release_drc(u32 drc_index);

+void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
+			 struct completion *hotplug_done, int *rc);
 #ifdef CONFIG_MEMORY_HOTPLUG
 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
 #else
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 9a3e27b..d11e8ca 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -43,6 +43,7 @@ static int ras_check_exception_token;
 /* EPOW events counter variable */
 static int num_epow_events;

+static irqreturn_t ras_hotplug_interrupt(int irq, void *dev_id);
 static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
 static irqreturn_t ras_error_interrupt(int irq, void *dev_id);

@@ -65,6 +66,14 @@ static int __init init_ras_IRQ(void)
 		of_node_put(np);
 	}

+	/* Hotplug Events */
+	np = of_find_node_by_path("/event-sources/hot-plug-events");
+	if (np != NULL) {
+		request_event_sources_irqs(np, ras_hotplug_interrupt,
+					   "RAS_HOTPLUG");
+		of_node_put(np);
+	}
+
 	/* EPOW Events */
 	np = of_find_node_by_path("/event-sources/epow-events");
 	if (np != NULL) {
@@ -190,6 +199,35 @@ static void rtas_parse_epow_errlog(struct rtas_error_log *log)
 		num_epow_events++;
 }

+static irqreturn_t ras_hotplug_interrupt(int irq, void *dev_id)
+{
+	struct pseries_errorlog *pseries_log;
+	struct pseries_hp_errorlog *hp_elog;
+
+	spin_lock(&ras_log_buf_lock);
+
+	rtas_call(ras_check_exception_token, 6, 1, NULL,
+		  RTAS_VECTOR_EXTERNAL_INTERRUPT, virq_to_hw(irq),
+		  RTAS_HOTPLUG_EVENTS, 0, __pa(&ras_log_buf),
+		  rtas_get_error_log_max());
+
+	pseries_log = get_pseries_errorlog((struct rtas_error_log *)ras_log_buf,
+					   PSERIES_ELOG_SECT_ID_HOTPLUG);
+	hp_elog = (struct pseries_hp_errorlog *)pseries_log->data;
+
+	/* Since PCI hotplug is not currently supported on pseries, put
+	 * PCI hotplug events on the ras_log_buf to be handled by rtas_errd
+	 */
+	if (hp_elog->resource == PSERIES_HP_ELOG_RESOURCE_MEM ||
+	    hp_elog->resource == PSERIES_HP_ELOG_RESOURCE_CPU)
+		queue_hotplug_event(hp_elog, NULL, NULL);
+	else
+		log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, 0);
+
+	spin_unlock(&ras_log_buf_lock);
+	return IRQ_HANDLED;
+}
+
 /* Handle environmental and power warning (EPOW) interrupts. */
 static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
 {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events
  2016-07-07 14:57 [PATCH 0/3] powerpc/pseries: Add pseries hotplug queue and PowerVM/PowerKVM use cases John Allen
  2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
  2016-07-07 15:03 ` [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source John Allen
@ 2016-07-07 15:05 ` John Allen
  2016-07-11 15:52   ` Nathan Fontenot
  2 siblings, 1 reply; 8+ messages in thread
From: John Allen @ 2016-07-07 15:05 UTC (permalink / raw)
  To: Nathan Fontenot, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

The sysfs interface used to handle PowerVM hotplug events should use the
hotplug queue as well. PRRN events will soon be placing many hotplug
events on the queue at once and we will need ordinary hotplug events to
use the queue as well in order to ensure these events will still be handled
and that proper serialization is maintained during the PRRN event.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/dlpar.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 66a77d7..4748124 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -489,7 +489,9 @@ static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
 		goto dlpar_store_out;
 	}

-	rc = handle_dlpar_errorlog(hp_elog);
+	init_completion(&hotplug_done);
+	queue_hotplug_event(hp_elog, &hotplug_done, &rc);
+	wait_for_completion(&hotplug_done);

 dlpar_store_out:
 	kfree(hp_elog);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue
  2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
@ 2016-07-11 15:48   ` Nathan Fontenot
  2016-07-20  9:10   ` [1/3] " Michael Ellerman
  1 sibling, 0 replies; 8+ messages in thread
From: Nathan Fontenot @ 2016-07-11 15:48 UTC (permalink / raw)
  To: John Allen, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

On 07/07/2016 10:00 AM, John Allen wrote:
> In support of PAPR changes to add a new hotplug interrupt, introduce a
> hotplug workqueue to avoid processing hotplug events in interrupt context.
> We will also take advantage of the queue on PowerVM to ensure hotplug
> events initiated from different sources (HMC and PRRN events) are handled
> and serialized properly.
> 
> Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/dlpar.c |   52 ++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index 2b93ae8..66a77d7 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -27,6 +27,15 @@
>  #include <asm/uaccess.h>
>  #include <asm/rtas.h>
> 
> +struct workqueue_struct *pseries_hp_wq;
> +
> +struct pseries_hp_work {
> +	struct work_struct work;
> +	struct pseries_hp_errorlog *errlog;
> +	struct completion *hp_completion;
> +	int *rc;
> +};
> +
>  struct cc_workarea {
>  	__be32	drc_index;
>  	__be32	zero;
> @@ -368,10 +377,51 @@ static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog)
>  	return rc;
>  }
> 
> +void pseries_hp_work_fn(struct work_struct *work)
> +{
> +	struct pseries_hp_work *hp_work =
> +			container_of(work, struct pseries_hp_work, work);
> +
> +	if (hp_work->rc)
> +		*(hp_work->rc) = handle_dlpar_errorlog(hp_work->errlog);
> +	else
> +		handle_dlpar_errorlog(hp_work->errlog);
> +
> +	if (hp_work->hp_completion)
> +		complete(hp_work->hp_completion);
> +
> +	kfree(hp_work->errlog);
> +	kfree((void *)work);
> +}
> +
> +void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
> +			 struct completion *hotplug_done, int *rc)
> +{
> +	struct pseries_hp_work *work;
> +	struct pseries_hp_errorlog *hp_errlog_copy;
> +
> +	hp_errlog_copy = kmalloc(sizeof(struct pseries_hp_errorlog),
> +				 GFP_KERNEL);
> +	memcpy(hp_errlog_copy, hp_errlog, sizeof(struct pseries_hp_errorlog));
> +
> +	work = kmalloc(sizeof(struct pseries_hp_work), GFP_KERNEL);
> +	if (work) {
> +		INIT_WORK((struct work_struct *)work, pseries_hp_work_fn);
> +		work->errlog = hp_errlog_copy;
> +		work->hp_completion = hotplug_done;
> +		work->rc = rc;
> +		queue_work(pseries_hp_wq, (struct work_struct *)work);
> +	} else {
> +		*rc = -ENOMEM;
> +		complete(hotplug_done);
> +	}
> +}
> +
>  static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
>  			   const char *buf, size_t count)
>  {
>  	struct pseries_hp_errorlog *hp_elog;
> +	struct completion hotplug_done;

It may not matter but this looks it may fit better in patch 3/3.

Otherwise looks good.

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

>  	const char *arg;
>  	int rc;
> 
> @@ -450,6 +500,8 @@ static CLASS_ATTR(dlpar, S_IWUSR, NULL, dlpar_store);
> 
>  static int __init pseries_dlpar_init(void)
>  {
> +	pseries_hp_wq = alloc_workqueue("pseries hotplug workqueue",
> +					WQ_UNBOUND, 1);
>  	return sysfs_create_file(kernel_kobj, &class_attr_dlpar.attr);
>  }
>  machine_device_initcall(pseries, pseries_dlpar_init);
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source
  2016-07-07 15:03 ` [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source John Allen
@ 2016-07-11 15:49   ` Nathan Fontenot
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Fontenot @ 2016-07-11 15:49 UTC (permalink / raw)
  To: John Allen, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

On 07/07/2016 10:03 AM, John Allen wrote:
> Add handler for new hotplug interrupt. For memory and CPU hotplug events,
> we will add the hotplug errorlog to the hotplug workqueue. Since PCI
> hotplug is not currently supported in the kernel, PCI hotplug events are
> written to the rtas_log_bug and are handled by rtas_errd.
> 
> Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

> ---
>  arch/powerpc/platforms/pseries/pseries.h |    2 ++
>  arch/powerpc/platforms/pseries/ras.c     |   38 ++++++++++++++++++++++++++++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
> index ddb9aa5..bba3285 100644
> --- a/arch/powerpc/platforms/pseries/pseries.h
> +++ b/arch/powerpc/platforms/pseries/pseries.h
> @@ -56,6 +56,8 @@ extern int dlpar_detach_node(struct device_node *);
>  extern int dlpar_acquire_drc(u32 drc_index);
>  extern int dlpar_release_drc(u32 drc_index);
> 
> +void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
> +			 struct completion *hotplug_done, int *rc);
>  #ifdef CONFIG_MEMORY_HOTPLUG
>  int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
>  #else
> diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
> index 9a3e27b..d11e8ca 100644
> --- a/arch/powerpc/platforms/pseries/ras.c
> +++ b/arch/powerpc/platforms/pseries/ras.c
> @@ -43,6 +43,7 @@ static int ras_check_exception_token;
>  /* EPOW events counter variable */
>  static int num_epow_events;
> 
> +static irqreturn_t ras_hotplug_interrupt(int irq, void *dev_id);
>  static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
>  static irqreturn_t ras_error_interrupt(int irq, void *dev_id);
> 
> @@ -65,6 +66,14 @@ static int __init init_ras_IRQ(void)
>  		of_node_put(np);
>  	}
> 
> +	/* Hotplug Events */
> +	np = of_find_node_by_path("/event-sources/hot-plug-events");
> +	if (np != NULL) {
> +		request_event_sources_irqs(np, ras_hotplug_interrupt,
> +					   "RAS_HOTPLUG");
> +		of_node_put(np);
> +	}
> +
>  	/* EPOW Events */
>  	np = of_find_node_by_path("/event-sources/epow-events");
>  	if (np != NULL) {
> @@ -190,6 +199,35 @@ static void rtas_parse_epow_errlog(struct rtas_error_log *log)
>  		num_epow_events++;
>  }
> 
> +static irqreturn_t ras_hotplug_interrupt(int irq, void *dev_id)
> +{
> +	struct pseries_errorlog *pseries_log;
> +	struct pseries_hp_errorlog *hp_elog;
> +
> +	spin_lock(&ras_log_buf_lock);
> +
> +	rtas_call(ras_check_exception_token, 6, 1, NULL,
> +		  RTAS_VECTOR_EXTERNAL_INTERRUPT, virq_to_hw(irq),
> +		  RTAS_HOTPLUG_EVENTS, 0, __pa(&ras_log_buf),
> +		  rtas_get_error_log_max());
> +
> +	pseries_log = get_pseries_errorlog((struct rtas_error_log *)ras_log_buf,
> +					   PSERIES_ELOG_SECT_ID_HOTPLUG);
> +	hp_elog = (struct pseries_hp_errorlog *)pseries_log->data;
> +
> +	/* Since PCI hotplug is not currently supported on pseries, put
> +	 * PCI hotplug events on the ras_log_buf to be handled by rtas_errd
> +	 */
> +	if (hp_elog->resource == PSERIES_HP_ELOG_RESOURCE_MEM ||
> +	    hp_elog->resource == PSERIES_HP_ELOG_RESOURCE_CPU)
> +		queue_hotplug_event(hp_elog, NULL, NULL);
> +	else
> +		log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, 0);
> +
> +	spin_unlock(&ras_log_buf_lock);
> +	return IRQ_HANDLED;
> +}
> +
>  /* Handle environmental and power warning (EPOW) interrupts. */
>  static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
>  {
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events
  2016-07-07 15:05 ` [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events John Allen
@ 2016-07-11 15:52   ` Nathan Fontenot
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Fontenot @ 2016-07-11 15:52 UTC (permalink / raw)
  To: John Allen, Michael Ellerman, linuxppc-dev; +Cc: Michael Roth

On 07/07/2016 10:05 AM, John Allen wrote:
> The sysfs interface used to handle PowerVM hotplug events should use the
> hotplug queue as well. PRRN events will soon be placing many hotplug
> events on the queue at once and we will need ordinary hotplug events to
> use the queue as well in order to ensure these events will still be handled
> and that proper serialization is maintained during the PRRN event.
> 
> Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>

Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

> ---
>  arch/powerpc/platforms/pseries/dlpar.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index 66a77d7..4748124 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -489,7 +489,9 @@ static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
>  		goto dlpar_store_out;
>  	}
> 
> -	rc = handle_dlpar_errorlog(hp_elog);
> +	init_completion(&hotplug_done);
> +	queue_hotplug_event(hp_elog, &hotplug_done, &rc);
> +	wait_for_completion(&hotplug_done);
> 
>  dlpar_store_out:
>  	kfree(hp_elog);
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [1/3] powerpc/pseries: Add pseries hotplug workqueue
  2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
  2016-07-11 15:48   ` Nathan Fontenot
@ 2016-07-20  9:10   ` Michael Ellerman
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2016-07-20  9:10 UTC (permalink / raw)
  To: John Allen, Nathan Fontenot, linuxppc-dev; +Cc: Michael Roth

On Thu, 2016-07-07 at 15:00:34 UTC, John Allen wrote:
> In support of PAPR changes to add a new hotplug interrupt, introduce a
> hotplug workqueue to avoid processing hotplug events in interrupt context.
> We will also take advantage of the queue on PowerVM to ensure hotplug
> events initiated from different sources (HMC and PRRN events) are handled
> and serialized properly.
> 
> Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
> Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9054619ef54a3a832863ae25d1

cheers

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-20  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 14:57 [PATCH 0/3] powerpc/pseries: Add pseries hotplug queue and PowerVM/PowerKVM use cases John Allen
2016-07-07 15:00 ` [PATCH 1/3] powerpc/pseries: Add pseries hotplug workqueue John Allen
2016-07-11 15:48   ` Nathan Fontenot
2016-07-20  9:10   ` [1/3] " Michael Ellerman
2016-07-07 15:03 ` [PATCH 2/3] powerpc/pseries: Add support for hotplug interrupt source John Allen
2016-07-11 15:49   ` Nathan Fontenot
2016-07-07 15:05 ` [PATCH 3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events John Allen
2016-07-11 15:52   ` Nathan Fontenot

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).