[PATCH] DEBUG: shortcut mobility fixup/migration store, and abuse no_rfi_flush

Mauricio Faria de Oliveira mauricfo at linux.vnet.ibm.com
Thu Feb 15 08:39:25 AEDT 2018


Signed-off-by: Mauricio Faria de Oliveira <mauricfo at linux.vnet.ibm.com>
---
 arch/powerpc/kernel/setup_64.c            | 8 ++++++++
 arch/powerpc/platforms/pseries/mobility.c | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index d692f71..a05b9f4 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -892,6 +892,9 @@ static bool init_fallback_flush(void)
 
 void setup_rfi_flush(enum l1d_flush_type types, bool enable)
 {
+	if (no_rfi_flush)
+		types = L1D_FLUSH_NONE;
+
 	if (types & L1D_FLUSH_FALLBACK) {
 		if (init_fallback_flush())
 			pr_info("rfi-flush: Using fallback displacement flush\n");
@@ -911,6 +914,11 @@ void setup_rfi_flush(enum l1d_flush_type types, bool enable)
 
 	if (!no_rfi_flush)
 		rfi_flush_enable(enable);
+
+	if (no_rfi_flush) {
+		pr_info("rfi-flush: re-enabled\n");
+		no_rfi_flush = 0;
+	}
 }
 
 #ifdef CONFIG_DEBUG_FS
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index 8a8033a..201710e 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -326,6 +326,7 @@ int pseries_devicetree_update(s32 scope)
 
 void post_mobility_fixup(void)
 {
+#if 0
 	int rc;
 	int activate_fw_token;
 
@@ -347,6 +348,7 @@ void post_mobility_fixup(void)
 	if (rc)
 		printk(KERN_ERR "Post-mobility device tree update "
 			"failed: %d\n", rc);
+#endif
 
 	/* Possibly switch to a new RFI flush type */
 	pseries_setup_rfi_flush();
@@ -358,6 +360,7 @@ static ssize_t migration_store(struct class *class,
 			       struct class_attribute *attr, const char *buf,
 			       size_t count)
 {
+#if 0
 	u64 streamid;
 	int rc;
 
@@ -373,6 +376,7 @@ static ssize_t migration_store(struct class *class,
 
 	if (rc)
 		return rc;
+#endif
 
 	post_mobility_fixup();
 	return count;
-- 
2.7.4



More information about the Linuxppc-dev mailing list