Skip to contentSkip to conversation

ARM: EXYNOS: do not try to map PMU for exynos5440

PATCH New Pankaj Dubey 2 participants 3 messages Jan 5, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: EXYNOS: do not try to map PMU for exynos5440

Commit id: 2e94ac42898f84d76e3c21dd91bc is not taking care of mapping of exynos5440 PMU register which will result in kernel panic on exynos5440.

As exynos5440 DTS does not have PMU node, and also we are skipping exynos_pm_init in case of exynos5440, let's avoid mapping of exynos5440 PMU.

---
 arch/arm/mach-exynos/exynos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +2 -1
index c13d083..1891b8c 100644
@@ -208,7 +208,8 @@ static void __init exynos_init_irq(void)
 	 * DT is not unflatten so we can't use DT APIs before
 	 * init_irq
 	 */
-	exynos_map_pmu();
+	if (!of_machine_is_compatible("samsung,exynos5440"))
+		exynos_map_pmu();
 }
 
 static void __init exynos_dt_machine_init(void)
Signature · 1 line
2.2.0
#1 lore raw

PATCH 1/1 ARM: EXYNOS: do not try to map PMU for exynos5440

Quoted 19 lines · Pankaj Dubey

Commit id: 2e94ac42898f84d76e3c21dd91bc is not taking care of mapping of exynos5440 PMU register which will result in kernel panic on exynos5440.

As exynos5440 DTS does not have PMU node, and also we are skipping exynos_pm_init in case of exynos5440, let's avoid mapping of exynos5440 PMU.

---
 arch/arm/mach-exynos/exynos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +0 -0
index c13d083..1891b8c 100644

arch/arm/mach-exynos/exynos.c static void __init exynos_init_irq(void) · line 215

Quoted 9 lines
arch/arm/mach-exynos/exynos.c +2 -1
@@ -208,7 +208,8 @@ static void __init exynos_init_irq(void)
 	 * DT is not unflatten so we can't use DT APIs before
 	 * init_irq
 	 */
-	exynos_map_pmu();
+	if (!of_machine_is_compatible("samsung,exynos5440"))
+		exynos_map_pmu();
 }
 
 static void __init exynos_dt_machine_init(void)

Why the blacklist approach rather then simply making exynos_map_pmu exit rather then panicing if it couldn't find a pmu node in the dts?

Signature · 9 lines
Sjoerd Simons <[email protected]>
Collabora Ltd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6170 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150105/72bb9903/attachment.bin>
#2 lore raw

PATCH 1/1 ARM: EXYNOS: do not try to map PMU for exynos5440

Hi,

Quoted 28 lines · Sjoerd Simons
Quoted 27 lines · Pankaj Dubey

Commit id: 2e94ac42898f84d76e3c21dd91bc is not taking care of mapping of exynos5440 PMU register which will result in kernel panic on exynos5440.

As exynos5440 DTS does not have PMU node, and also we are skipping exynos_pm_init in case of exynos5440, let's avoid mapping of exynos5440 PMU.

---
  arch/arm/mach-exynos/exynos.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +2 -1
index c13d083..1891b8c 100644
@@ -208,7 +208,8 @@ static void __init exynos_init_irq(void)
  	 * DT is not unflatten so we can't use DT APIs before
  	 * init_irq
  	 */
-	exynos_map_pmu();
+	if (!of_machine_is_compatible("samsung,exynos5440"))
+		exynos_map_pmu();
  }
 
Quoted 5 lines

arch/arm/mach-exynos/exynos.c static void __init exynos_init_irq(void) · line 215

Quoted 1 line
arch/arm/mach-exynos/exynos.c +0 -0
  static void __init exynos_dt_machine_init(void)

Why the blacklist approach rather then simply making exynos_map_pmu exit rather then panicing if it couldn't find a pmu node in the dts?

exynos_map_pmu is panicking if it fails to iomap PMU, as for most of exynos SoCs PMU based address is MUST for secondary core bootup in platsmp.c, but with exynos5440 it is not the same case. In-fact exynos_pm_init is also bypassed for exynos5440. For the same reason I adopted this approach rather removing panic from exynos_map_pmu.

Thanks,
Pankaj Dubey

Quoted 1 line