[Crash-utility] [PATCH] arm64 : assign page_offset and kvbase based on VA_BITS passed
lijiang
lijiang at redhat.com
Mon Sep 27 06:29:25 UTC 2021
> Date: Thu, 23 Sep 2021 01:46:31 +0530
> From: Ankur Bansal <er.ankurbansal at gmail.com>
> To: crash-utility at redhat.com
> Cc: Ankur Bansal <er.ankurbansal at gmail.com>
> Subject: [Crash-utility] [PATCH] arm64 : assign page_offset and kvbase
> based on VA_BITS passed
> Message-ID:
> <1632341791-10205-1-git-send-email-er.ankurbansal at gmail.com>
> Content-Type: text/plain; charset="US-ASCII"
>
> assign page_offset and kvbase based on VA_BITS passed
>
Thank you for the patch, Ankur.
Can you help to describe the reason in detail? And what happened?
Thanks.
Lianbo
> Change-Id: I525f3c7fd91e1f06e909c2f4c1749c44c068baea
> Signed-off-by: Ankur Bansal <er.ankurbansal at gmail.com>
> ---
> 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
More information about the Crash-utility
mailing list