arm64: mm: move pte_* macros
authorMark Rutland <mark.rutland@arm.com>
Mon, 25 Jan 2016 11:45:03 +0000 (11:45 +0000)
committerAlex Shi <alex.shi@linaro.org>
Thu, 10 Nov 2016 08:16:58 +0000 (16:16 +0800)
commit03f3f03d454da21b61d6a18575d909b035fa80b2
treefd4c4c29afb9749422f6bb55ffc0af969cf954d1
parent4d4fe8f2b27ceb29c16b32c3882ebd19bf21800f
arm64: mm: move pte_* macros

For pmd, pud, and pgd levels of table, functions including p?d_index and
p?d_offset are defined after the p?d_page_vaddr function for the
immediately higher level of table.

The pte functions however are defined much earlier, even though several
rely on the later definition of pmd_page_vaddr. While this isn't
currently a problem as these are macros, it prevents the logical
grouping of later C functions (which cannot rely on prototypes for
functions not yet defined).

Move these definitions after pmd_page_vaddr, for consistency with the
placement of these functions for other levels of table.

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 053520f7d3923cc6d37afb28f9887cb1e7d77454)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/pgtable.h