[RESEND] cxl: Force psl data-cache flush during device shutdown

Subsystems: char and misc drivers, the rest

4 messages, 4 authors, 2017-01-27 · open the first message on its own page

[RESEND] cxl: Force psl data-cache flush during device shutdown

From: Vaibhav Jain <hidden>
Date: 2017-01-04 06:19:42

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 <redacted>
---
Resend: Fixed the author ident.
---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 80a87ab..73432e7 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);
-- 
2.9.3

Re: [RESEND] cxl: Force psl data-cache flush during device shutdown

From: Andrew Donnellan <hidden>
Date: 2017-01-04 06:44:10

On 04/01/17 17:18, Vaibhav Jain wrote:
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 <redacted>
Should this be cc: stable? (it does depend on aaa2245ed836 which only came in during 4.9)

Looks good.

Reviewed-by: Andrew Donnellan <redacted>


quoted hunk
---
Resend: Fixed the author ident.
---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 80a87ab..73432e7 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);
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

Re: [RESEND] cxl: Force psl data-cache flush during device shutdown

From: Frederic Barrat <hidden>
Date: 2017-01-05 14:44:23


Le 04/01/2017 à 07:18, Vaibhav Jain a écrit :
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 <redacted>
---
Looks good to me, thanks!

Acked-by: Frederic Barrat <redacted>

quoted hunk
Resend: Fixed the author ident.
---
 drivers/misc/cxl/pci.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 80a87ab..73432e7 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);

Re: [RESEND] cxl: Force psl data-cache flush during device shutdown

From: Michael Ellerman <hidden>
Date: 2017-01-27 00:40:34

On Wed, 2017-01-04 at 06:18:52 UTC, Vaibhav Jain wrote:
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 <redacted>
Reviewed-by: Andrew Donnellan <redacted>
Acked-by: Frederic Barrat <redacted>
Applied to powerpc next, thanks.

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

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help