aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2015-07-28 10:31:06 +0100
committerAlex Shi <alex.shi@linaro.org>2016-05-18 16:04:45 +0800
commitc283ac9ebafb5ac526b89d06c7081305922e3c0f (patch)
tree172990d862201e5df7c25c785e331daab2672ad0
parentcc4f29af3f6060e39e7f6d0a0d4fb8b421a6d199 (diff)
arm64: mm: mark create_mapping as __init
Currently create_mapping is marked with __ref, apparently because it refers to early_alloc. However, create_mapping has no logic to prevent erroneous use of early_alloc after it has been freed, and is only ever called by __init functions anyway. Thus the __ref marker is misleading and unnecessary. Instead, this patch marks create_mapping as __init, resulting in warnings if it is used from a a non __init functions, and allowing its memory to be reclaimed. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit c53e0baa6f34b7051790e0fba9d782ec4efe58bd) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--arch/arm64/mm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 0646353af665..1a1efda487da 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -283,7 +283,7 @@ static void *late_pgtable_alloc(void)
return ptr;
}
-static void __ref create_mapping(phys_addr_t phys, unsigned long virt,
+static void __init create_mapping(phys_addr_t phys, unsigned long virt,
phys_addr_t size, pgprot_t prot)
{
if (virt < VMALLOC_START) {