]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: EXYNOS: Fix kernel panic when unplugging CPU1 on exynos
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 25 May 2014 19:50:34 +0000 (04:50 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Sun, 25 May 2014 20:21:47 +0000 (05:21 +0900)
A look at the code reveals use of S5P_VA_SYSRAM macro, in case of certain SoC
revisions, which is not valid any longer, after SYSRAM started to be mapped
dynamically. The new dynamic mapping is stored in sysram_base_addr variable,
which is declared static in platsmp.c

This fix makes sysram_base_addr non-static, declared it in common.h and used
in pm.c instead of S5P_VA_SYSRAM.

Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/platsmp.c
arch/arm/mach-exynos/pm.c

index 27c9abdeb79e0651feae76addd0ed22a71fc078c..5848d3cc29e9d92cdb07bdf34f0a6eb7d4734027 100644 (file)
@@ -19,6 +19,7 @@ void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
 
 struct map_desc;
 extern void __iomem *sysram_ns_base_addr;
+extern void __iomem *sysram_base_addr;
 void exynos_init_io(void);
 void exynos_restart(enum reboot_mode mode, const char *cmd);
 void exynos_cpuidle_init(void);
index 78002c7344b349510e3bcd7cb36c1b1bd5a81d0c..9e5e230575ddaeaac320c100049a66a17394bc4e 100644 (file)
@@ -34,7 +34,7 @@
 
 extern void exynos4_secondary_startup(void);
 
-static void __iomem *sysram_base_addr;
+void __iomem *sysram_base_addr;
 void __iomem *sysram_ns_base_addr;
 
 static void __init exynos_smp_prepare_sysram(void)
index f7b0b77582f617f710b3141009f5424e604b1dee..0d1a46e7b021d3b2d360259ecf8aa7a6c49116ad 100644 (file)
@@ -169,10 +169,10 @@ int exynos_cluster_power_state(int cluster)
 
 #define EXYNOS_BOOT_VECTOR_ADDR        (samsung_rev() == EXYNOS4210_REV_1_1 ? \
                        S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
-                       (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0))
+                       (sysram_base_addr + 0x24) : S5P_INFORM0))
 #define EXYNOS_BOOT_VECTOR_FLAG        (samsung_rev() == EXYNOS4210_REV_1_1 ? \
                        S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
-                       (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1))
+                       (sysram_base_addr + 0x20) : S5P_INFORM1))
 
 #define S5P_CHECK_AFTR  0xFCBA0D10
 #define S5P_CHECK_SLEEP 0x00000BAD