arm64: mm: allow passing a pgdir to alloc_init_*
authorMark Rutland <mark.rutland@arm.com>
Mon, 25 Jan 2016 11:45:10 +0000 (11:45 +0000)
committerAlex Shi <alex.shi@linaro.org>
Fri, 11 Nov 2016 08:40:27 +0000 (16:40 +0800)
commit1adf036ec9cf6bb3090b945d6485b8a9095ec817
tree9cc6c786bf0dc3c0735e8ef263201d0de1792a7e
parentae97b43d8a46b19d1fada3f294e14873b720a559
arm64: mm: allow passing a pgdir to alloc_init_*

To allow us to initialise pgdirs which are fixmapped, allow explicitly
passing a pgdir rather than an mm. A new __create_pgd_mapping function
is added for this, with existing __create_mapping callers migrated to
this.

The mm argument was previously only used at the top level. Now that it
is redundant at all levels, it is removed. To indicate its new found
similarity to alloc_init_{pud,pmd,pte}, __create_mapping is renamed to
init_pgd.

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>
(cherry picked from commit 11509a306bb6ea595878b2d246d2d56b1783e040)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/mm/mmu.c