Skip to content

Commit

Permalink
arm64: mm: apply __ro_after_init to memory_limit
Browse files Browse the repository at this point in the history
This variable is only set during initialization, so mark with
__ro_after_init.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20211215064559.2843555-1-peng.fan@oss.nxp.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Peng Fan authored and Catalin Marinas committed Jan 20, 2022
1 parent 3364c6c commit bb425a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int pfn_is_map_memory(unsigned long pfn)
}
EXPORT_SYMBOL(pfn_is_map_memory);

static phys_addr_t memory_limit = PHYS_ADDR_MAX;
static phys_addr_t memory_limit __ro_after_init = PHYS_ADDR_MAX;

/*
* Limit the memory size that was specified via FDT.
Expand Down

0 comments on commit bb425a7

Please sign in to comment.