Thread (2 messages) flat view 2 messages, 2 authors, 2017-07-06

Re: [PATCH] cxl: Fix is_page_fault() for POWER9

From: Vaibhav Jain <hidden>
Date: 2017-07-06 11:08:29

Christophe Lombard [off-list ref] writes:
This patches removes this restriction and all page faults, whatever the
reason, will be handled. In this case, the interruption is always
acknowledged.
This can also be done with adding call to cxl_ack_ae(ctx) at the end of
cxl_handle_fault().
 static bool cxl_is_page_fault(struct cxl_context *ctx, u64 dsisr)
 {
-	u64 crs; /* Translation Checkout Response Status */
-
 	if ((cxl_is_power8()) && (dsisr & CXL_PSL_DSISR_An_DM))
 		return true;

-	if (cxl_is_power9()) {
-		crs = (dsisr & CXL_PSL9_DSISR_An_CO_MASK);
-		if ((crs == CXL_PSL9_DSISR_An_PF_SLR) ||
-		    (crs == CXL_PSL9_DSISR_An_PF_RGC) ||
-		    (crs == CXL_PSL9_DSISR_An_PF_RGP) ||
-		    (crs == CXL_PSL9_DSISR_An_PF_HRH) ||
-		    (crs == CXL_PSL9_DSISR_An_PF_STEG) ||
-		    (crs == CXL_PSL9_DSISR_An_URTCH)) {
-			return true;
-		}
-	}
Removing this check will force call to copro_handle_mm_fault even for
nmmu reported errors that only need to be communicated to the AFU and
not handled by mm subsystem as such. 
+	if (cxl_is_power9())
+		return true;
Optional: With this change the function has become a good candidate for
being inlined or even converting to a macro.

-- 
Vaibhav Jain [off-list ref]
Linux Technology Center, IBM India Pvt. Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help