Re: [PATCH 06/65] powerpc/cxl: Use REGION_ID instead of opencoding

From
Ian Munsie <hidden>
Date
2016-03-27 15:49:12
Reply to
Aneesh Kumar K.V, 2016-03-27
Copying in Andrew Donnellan - this looks to be roughly equivalent to
your patch:

[PATCH] cxl: fix setting of _PAGE_USER bit when handling page faults

I think we were waiting on a v2 of that patch - does the below replace
the need for that?

Also copying cxlflash folk as an FYI

Acked-by: Ian Munsie <redacted>

Excerpts from Aneesh Kumar K.V's message of 2016-03-27 03:23:14 -0500:
quoted hunk ↗ jump to hunk
Signed-off-by: Aneesh Kumar K.V <redacted>
---
 drivers/misc/cxl/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c
index 33bd0ee30edd..67cc657e96cc 100644
--- a/drivers/misc/cxl/fault.c
+++ b/drivers/misc/cxl/fault.c
@@ -154,7 +154,7 @@ static void cxl_handle_page_fault(struct cxl_context *ctx,
         access |= _PAGE_WRITE;
 
     access |= _PAGE_PRIVILEGED;
-    if ((!ctx->kernel) || ~(dar & (1ULL << 63)))
+    if ((!ctx->kernel) || (REGION_ID(dar) == USER_REGION_ID))
         access &= ~_PAGE_PRIVILEGED;
 
     if (dsisr & DSISR_NOHPTE)
Thread (92 messages) 92 messages, 7 authors, last reply 2018-06-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help