Skip to contentSkip to conversation

cxl: Force psl data-cache flush during device shutdown

PATCH RESEND Applied Vaibhav Jain 4 participants 4 messages Jan 4, 2017 – Jan 27, 2017 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 cxl: Force psl data-cache flush during device shutdown

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.

---
Resend: Fixed the author ident.

---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/misc/cxl/pci.c +3 -0
index 80a87ab..73432e7 100644
@@ -1610,6 +1610,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);
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Vaibhav Jain

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.

Should this be cc: stable? (it does depend on aaa2245ed836 which only came in during 4.9)

Looks good.

Quoted 21 lines

---
Resend: Fixed the author ident.

---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/misc/cxl/pci.c +3 -0
index 80a87ab..73432e7 100644
@@ -1610,6 +1610,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);
Signature · 2 lines
Andrew Donnellan              OzLabs, ADL Canberra
[email protected]  IBM Australia Limited
Acked-by on v1 1/1
#2 lore raw
In reply to Vaibhav Jain
Quoted 7 lines · Vaibhav Jain

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.

---

Looks good to me, thanks!

Quoted 20 lines

Resend: Fixed the author ident.

---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/misc/cxl/pci.c +3 -0
index 80a87ab..73432e7 100644
@@ -1610,6 +1610,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);
#3 lore raw
In reply to Vaibhav Jain
Quoted 8 lines · Vaibhav Jain

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.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/d7b1946c7925a270062b2e0718aa57

cheers