[PATCH] arm64 : assign page_offset and kvbase based on VA_BITS passed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



assign page_offset and kvbase based on VA_BITS passed

Change-Id: I525f3c7fd91e1f06e909c2f4c1749c44c068baea
Signed-off-by: Ankur Bansal <er.ankurbansal@xxxxxxxxx>
---
 arm64.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/arm64.c b/arm64.c
index 7069312..2dc77f7 100644
--- a/arm64.c
+++ b/arm64.c
@@ -220,10 +220,17 @@ arm64_init(int when)
 
 		/* vabits_actual introduced after mm flip, so it should be flipped layout */
 		if (ms->VA_BITS_ACTUAL) {
-			ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
-			/* useless on arm64 */
-			machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
-			machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
+			if ((pc->flags2 & SNAP)) {
+				ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
+				/* useless on arm64 */
+				machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
+				machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
+			}
+			else{
+				ms->page_offset = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+				machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+				machdep->kvbase = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+			}
 			ms->userspace_top = ARM64_USERSPACE_TOP_ACTUAL;
 		} else {
 			ms->page_offset = ARM64_PAGE_OFFSET;
-- 
2.7.4

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux