Commit 731d97c2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski

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: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent b4765037
...@@ -45,8 +45,8 @@ static struct platform_device exynos_cpuidle = { ...@@ -45,8 +45,8 @@ static struct platform_device exynos_cpuidle = {
.id = -1, .id = -1,
}; };
void __iomem *sysram_base_addr; void __iomem *sysram_base_addr __ro_after_init;
void __iomem *sysram_ns_base_addr; void __iomem *sysram_ns_base_addr __ro_after_init;
void __init exynos_sysram_init(void) void __init exynos_sysram_init(void)
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29) #define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29)
#define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30) #define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30)
static void __iomem *ns_sram_base_addr; static void __iomem *ns_sram_base_addr __ro_after_init;
/* /*
* The common v7_exit_coherency_flush API could not be used because of the * The common v7_exit_coherency_flush API could not be used because of the
......
...@@ -66,7 +66,7 @@ struct exynos_pm_data { ...@@ -66,7 +66,7 @@ struct exynos_pm_data {
int (*cpu_suspend)(unsigned long); int (*cpu_suspend)(unsigned long);
}; };
static const struct exynos_pm_data *pm_data; static const struct exynos_pm_data *pm_data __ro_after_init;
static int exynos5420_cpu_state; static int exynos5420_cpu_state;
static unsigned int exynos_pmu_spare3; static unsigned int exynos_pmu_spare3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment