]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cxl: Force psl data-cache flush during device shutdown
authorVaibhav Jain <vaibhav@linux.vnet.ibm.com>
Wed, 4 Jan 2017 06:18:52 +0000 (11:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Jan 2017 02:34:23 +0000 (13:34 +1100)
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>
drivers/misc/cxl/pci.c

index 80a87ab25b83857a77ada244b6159c7b1c55a31a..73432e7d925d049a4db3a1490d4e0fcef19c90c4 100644 (file)
@@ -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);