diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2016-12-10 08:47:33 -0500 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2016-12-29 08:28:55 -0500 |
commit | 731d97c236833c2179ce6fe7a5eb32c46f71df27 (patch) | |
tree | b02a0c9532b2b7f1b2a9fd3a2ec315e2d086e94f | |
parent | b4765037fc8c392027e604cf05771f0ac2790303 (diff) |
ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init
The pointers to __iomem sysram and exynos_pm_data are set only during
initcalls. Later the pointers itself are used only in read-only way so
we can mark them __ro_after_init to increase code safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-rw-r--r-- | arch/arm/mach-exynos/exynos.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mcpm-exynos.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/suspend.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 757fc11de30d..35b832f4bc7e 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
@@ -45,8 +45,8 @@ static struct platform_device exynos_cpuidle = { | |||
45 | .id = -1, | 45 | .id = -1, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | void __iomem *sysram_base_addr; | 48 | void __iomem *sysram_base_addr __ro_after_init; |
49 | void __iomem *sysram_ns_base_addr; | 49 | void __iomem *sysram_ns_base_addr __ro_after_init; |
50 | 50 | ||
51 | void __init exynos_sysram_init(void) | 51 | void __init exynos_sysram_init(void) |
52 | { | 52 | { |
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index f086bf615b29..038fd8c993d0 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29) | 32 | #define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29) |
33 | #define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30) | 33 | #define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30) |
34 | 34 | ||
35 | static void __iomem *ns_sram_base_addr; | 35 | static void __iomem *ns_sram_base_addr __ro_after_init; |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * The common v7_exit_coherency_flush API could not be used because of the | 38 | * The common v7_exit_coherency_flush API could not be used because of the |
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index be29f06d04f1..518420241062 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c | |||
@@ -66,7 +66,7 @@ struct exynos_pm_data { | |||
66 | int (*cpu_suspend)(unsigned long); | 66 | int (*cpu_suspend)(unsigned long); |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static const struct exynos_pm_data *pm_data; | 69 | static const struct exynos_pm_data *pm_data __ro_after_init; |
70 | 70 | ||
71 | static int exynos5420_cpu_state; | 71 | static int exynos5420_cpu_state; |
72 | static unsigned int exynos_pmu_spare3; | 72 | static unsigned int exynos_pmu_spare3; |