From: lauraa@codeaurora.org (Laura Abbott)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: mm: increase VA range of identity map
Date: Tue, 24 Feb 2015 17:30:44 -0800 [thread overview]
Message-ID: <54ED25C4.2090900@codeaurora.org> (raw)
In-Reply-To: <1424797703-2804-1-git-send-email-ard.biesheuvel@linaro.org>
On 2/24/2015 9:08 AM, Ard Biesheuvel wrote:
> The page size and the number of translation levels, and hence the supported
> virtual address range, are build-time configurables on arm64 whose optimal
> values are use case dependent. However, in the current implementation, if
> the system's RAM is located at a very high offset, the virtual address range
> needs to reflect that merely because the identity mapping, which is only used
> to enable or disable the MMU, requires the extended virtual range to map the
> physical memory at an equal virtual offset.
>
> This patch relaxes that requirement, by increasing the number of translation
> levels for the identity mapping only, and only when actually needed, i.e.,
> when system RAM's offset is found to be out of reach at runtime.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> v2:
> - Dropped hunk regarding KVM, this will be addressed separately. Note that the
> build is still broken on Seattle if you have KVM enabled and 4k pages with
> 3 levels of translation configured, but at least you have something to watch
> on your console now
> - Fix ordering wrt TLB flushing
> - Set T0SZ based on actual leading zero count in __pa(KERNEL_END), the net
> result is the same (one additional level of translation, if needed)
>
> arch/arm64/include/asm/mmu_context.h | 38 ++++++++++++++++++++++++++++++++++
> arch/arm64/include/asm/page.h | 6 ++++--
> arch/arm64/include/asm/pgtable-hwdef.h | 7 ++++++-
> arch/arm64/kernel/head.S | 22 ++++++++++++++++++++
> arch/arm64/kernel/smp.c | 1 +
> arch/arm64/mm/mmu.c | 7 ++++++-
> arch/arm64/mm/proc-macros.S | 11 ++++++++++
> arch/arm64/mm/proc.S | 3 +++
> 8 files changed, 91 insertions(+), 4 deletions(-)
>
Tested-by: Laura Abbott <lauraa@codeaurora.org>
For both 4K and 64K pages.
--
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-02-25 1:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 17:08 [PATCH v2] arm64: mm: increase VA range of identity map Ard Biesheuvel
2015-02-25 1:30 ` Laura Abbott [this message]
2015-02-25 12:38 ` Catalin Marinas
2015-02-25 13:10 ` Ard Biesheuvel
2015-02-25 13:55 ` Ard Biesheuvel
2015-02-25 15:22 ` Catalin Marinas
2015-02-25 14:01 ` Will Deacon
2015-02-25 14:15 ` Ard Biesheuvel
2015-02-25 14:24 ` Will Deacon
2015-02-25 14:47 ` Ard Biesheuvel
2015-02-25 14:58 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54ED25C4.2090900@codeaurora.org \
--to=lauraa@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.