diff mbox series

[RFC,v5,3/6] migration/dlpar: Add device readd queuing function

Message ID a44f908b-03f9-9042-afaa-2a8bb593db4b@linux.vnet.ibm.com (mailing list archive)
State Superseded
Headers show
Series powerpc/hotplug: Fix affinity assoc for LPAR migration | expand

Commit Message

Michael Bringmann May 21, 2018, 5:52 p.m. UTC
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(+)

Comments

Thomas Falcon May 22, 2018, 8:24 p.m. UTC | #1
On 05/21/2018 12:52 PM, Michael Bringmann wrote:
> 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.

The function in the commit message and the patch have different names. The patch seems to queue a generic action instead of a readd.  The commit message needs to be updated to describe this new function.

Tom

>
> 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
Michael Bringmann May 22, 2018, 11:49 p.m. UTC | #2
On 05/22/2018 03:24 PM, Thomas Falcon wrote:
> On 05/21/2018 12:52 PM, Michael Bringmann wrote:
>> 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.
> 
> The function in the commit message and the patch have different names. The patch seems to queue a generic action instead of a readd.  The commit message needs to be updated to describe this new function.
> 
> Tom

Fixed.

Michael
> 
>>
>> 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
> 
> 
>
diff mbox series

Patch

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