From: Vaibhav Jain Date: Wed, 4 Jan 2017 06:18:52 +0000 (+0530) Subject: cxl: Force psl data-cache flush during device shutdown X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7b1946c7925a270062b2e0718aa57b42ba619c0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: Vaibhav Jain Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman --- diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 80a87ab25b83..73432e7d925d 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -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);