[PATCH v8 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration
Kajol Jain
kjain at linux.ibm.com
Wed May 6 21:07:37 AEST 2020
Function 'read_sys_info_pseries()' is added to get system parameter
values like number of sockets and chips per socket.
and it gets these details via rtas_call with token
"PROCESSOR_MODULE_INFO".
Incase lpar migrate from one system to another, system
parameter details like chips per sockets or number of sockets might
change. So, it needs to be re-initialized otherwise, these values
corresponds to previous system values.
This patch adds a call to 'read_sys_info_pseries()' from
'post-mobility_fixup()' to re-init the physsockets and physchips values
Signed-off-by: Kajol Jain <kjain at linux.ibm.com>
---
arch/powerpc/platforms/pseries/mobility.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index b571285f6c14..0fb8f1e6e9d2 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -42,6 +42,12 @@ struct update_props_workarea {
#define MIGRATION_SCOPE (1)
#define PRRN_SCOPE -2
+#ifdef CONFIG_HV_PERF_CTRS
+void read_sys_info_pseries(void);
+#else
+static inline void read_sys_info_pseries(void) { }
+#endif
+
static int mobility_rtas_call(int token, char *buf, s32 scope)
{
int rc;
@@ -371,6 +377,16 @@ void post_mobility_fixup(void)
/* Possibly switch to a new RFI flush type */
pseries_setup_rfi_flush();
+ /*
+ * In case an Lpar migrates from one system to another, system
+ * parameter details like chips per sockets, cores per chip and
+ * number of sockets details might change.
+ * So, they needs to be re-initialized otherwise the
+ * values will correspond to the previous system.
+ * Call read_sys_info_pseries() to reinitialise the values.
+ */
+ read_sys_info_pseries();
+
return;
}
--
2.18.2
More information about the Linuxppc-dev
mailing list