diff mbox

[ZESTY,8/9] cxl: Force psl data-cache flush during device shutdown

Message ID 1493241920-13310-8-git-send-email-leitao@debian.org
State New
Headers show

Commit Message

Breno Leitao April 26, 2017, 9:25 p.m. UTC
From: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1686519

This change adds a force psl data cache flush during device shutdown
callback. This should reduce a possibility of psl holding a dirty
cache line while the CAPP is being reinitialized, which may result in
a UE [load/store] machine check error.

Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit d7b1946c7925a270062b2e0718aa57b42ba619c0)
Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index b9c12425e6db..4a1b407ca514 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1667,6 +1667,9 @@  static void cxl_pci_remove_adapter(struct cxl *adapter)
 	cxl_sysfs_adapter_remove(adapter);
 	cxl_debugfs_adapter_remove(adapter);
 
+	/* Flush adapter datacache as its about to be removed */
+	cxl_data_cache_flush(adapter);
+
 	cxl_deconfigure_adapter(adapter);
 
 	device_unregister(&adapter->dev);