diff mbox

[3/3] powerpc/pseries: Use kernel hotplug queue for PowerVM hotplug events

Message ID 4467d582-954a-23ca-af5e-75ddc1c99cee@linux.vnet.ibm.com (mailing list archive)
State Accepted
Headers show

Commit Message

John Allen July 7, 2016, 3:05 p.m. UTC
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(-)

Comments

Nathan Fontenot July 11, 2016, 3:52 p.m. UTC | #1
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
>
diff mbox

Patch

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