diff options
author | Jisheng Zhang <jszhang@marvell.com> | 2016-08-15 09:45:46 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-08-22 14:32:29 +0300 |
commit | 5a9e3e156ec1ab26ba70b4c44157858c92bbeee0 (patch) | |
tree | 08786b2c7e30101dc85dd29b6cf8e43be55cd2d5 /arch/arm64/mm/init.c | |
parent | b6d081bddf397026575a437b603b118dff2606ff (diff) | |
download | linux-5a9e3e156ec1ab26ba70b4c44157858c92bbeee0.tar.xz |
arm64: apply __ro_after_init to some objects
These objects are set during initialization, thereafter are read only.
Previously I only want to mark vdso_pages, vdso_spec, vectors_page and
cpu_ops as __read_mostly from performance point of view. Then inspired
by Kees's patch[1] to apply more __ro_after_init for arm, I think it's
better to mark them as __ro_after_init. What's more, I find some more
objects are also read only after init. So apply __ro_after_init to all
of them.
This patch also removes global vdso_pagelist and tries to clean up
vdso_spec[] assignment code.
[1] http://www.spinics.net/lists/arm-kernel/msg523188.html
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/mm/init.c')
-rw-r--r-- | arch/arm64/mm/init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index bbb7ee76e319..251e0824cd82 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -23,6 +23,7 @@ #include <linux/swap.h> #include <linux/init.h> #include <linux/bootmem.h> +#include <linux/cache.h> #include <linux/mman.h> #include <linux/nodemask.h> #include <linux/initrd.h> @@ -55,8 +56,8 @@ * executes, which assigns it its actual value. So use a default value * that cannot be mistaken for a real physical address. */ -s64 memstart_addr __read_mostly = -1; -phys_addr_t arm64_dma_phys_limit __read_mostly; +s64 memstart_addr __ro_after_init = -1; +phys_addr_t arm64_dma_phys_limit __ro_after_init; #ifdef CONFIG_BLK_DEV_INITRD static int __init early_initrd(char *p) |