UPSTREAM: arm64: mm: Move ASID from TTBR0 to TTBR1 86/292986/1
authorWill Deacon <will.deacon@arm.com>
Thu, 10 Aug 2017 12:19:09 +0000 (13:19 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 18 May 2023 01:37:36 +0000 (10:37 +0900)
commit1dd78ae04de333cb027b5aeab49dd8630cbf4a39
treef5715fa90e3f544870afa2a3efaaa1d82cff03b2
parent420324b12fbaee99d88df08b8d270f4215ddc8eb
UPSTREAM: arm64: mm: Move ASID from TTBR0 to TTBR1

In preparation for mapping kernelspace and userspace with different
ASIDs, move the ASID to TTBR1 and update switch_mm to context-switch
TTBR0 via an invalid mapping (the zero page).

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 7655abb953860485940d4de74fb45a8192149bb6)

[toddpoynor@google.com: add missing mrs inst from context]
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[sw0312.kim: cherry-pick android.googlesource.com/kernel/common commit to resolve gcc-12 build issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I9575ae2f0b3b5383c44f7ace0ac50588be739e45
arch/arm64/include/asm/mmu_context.h
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/include/asm/proc-fns.h
arch/arm64/mm/proc.S