]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm64: mm: add functions to walk page tables by PA
authorMark Rutland <mark.rutland@arm.com>
Mon, 25 Jan 2016 11:45:04 +0000 (11:45 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 28 Jan 2016 12:03:11 +0000 (12:03 +0000)
commit599922913aca22b7bfa782e2b94aa495ce802445
treef4ea18eed90d6f13570df6d7aae2d643a144ee09
parent93b4755ceb531ae6aad14447c24df8b4ee9fae0b
arm64: mm: add functions to walk page tables by PA

To allow us to walk tables allocated into the fixmap, we need to acquire
the physical address of a page, rather than the virtual address in the
linear map.

This patch adds new p??_page_paddr and p??_offset_phys functions to
acquire the physical address of a next-level table, and changes
p??_offset* into macros which simply convert this to a linear map VA.
This renders p??_page_vaddr unused, and hence they are removed.

At the pgd level, a new pgd_offset_raw function is added to find the
relevant PGD entry given the base of a PGD and a virtual address.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h