Skip to contentSkip to conversation

ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped

PATCH New Will Deacon 2 participants 2 messages Aug 15, 2011 – Aug 16, 2011

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

PATCH 1/1 ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped

s3c24xx_pm_restart makes a direct call to arch_reset, without first establishing a 1:1 memory mapping. arch_reset will then call cpu_reset(0), which is designed to be called only with an identity map in place.

Following the discussion here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/057281.html

This patch ensures that arch_reset is only called via arm_machine_restart so that we have a consistent flat mapping requirement for the MMU-off code.

---
 arch/arm/plat-s3c24xx/cpu.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/plat-s3c24xx/cpu.c +0 -12
index c1fc6c6..528930c 100644
@@ -198,18 +198,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)
  */
 static void s3c24xx_pm_restart(char mode, const char *cmd)
 {
-	if (mode != 's') {
-		unsigned long flags;
-
-		local_irq_save(flags);
-		__cpuc_flush_kern_all();
-		__cpuc_flush_user_all();
-
-		arch_reset(mode, cmd);
-		local_irq_restore(flags);
-	}
-
-	/* fallback, or unhandled */
 	arm_machine_restart(mode, cmd);
 }
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped

Am Montag, 15. August 2011, 19:34:22 schrieb Will Deacon:

Quoted 5 lines

s3c24xx_pm_restart makes a direct call to arch_reset, without first establishing a 1:1 memory mapping. arch_reset will then call cpu_reset(0), which is designed to be called only with an identity map in place.

Quoted 7 lines

Following the discussion here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/057281.html

This patch ensures that arch_reset is only called via arm_machine_restart so that we have a consistent flat mapping requirement for the MMU-off code.

I'm not 100% sure, but you might want to include Kukjin Kim <[email protected]> who seems to be handling the Samsung-stuff most of the time.

Quoted 29 lines
---
 arch/arm/plat-s3c24xx/cpu.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/plat-s3c24xx/cpu.c +0 -12
index c1fc6c6..528930c 100644
@@ -198,18 +198,6 @@ static unsigned long s3c24xx_read_idcode_v4(void)
  */
 static void s3c24xx_pm_restart(char mode, const char *cmd)
 {
-	if (mode != 's') {
-		unsigned long flags;
-
-		local_irq_save(flags);
-		__cpuc_flush_kern_all();
-		__cpuc_flush_user_all();
-
-		arch_reset(mode, cmd);
-		local_irq_restore(flags);
-	}
-
-	/* fallback, or unhandled */
 	arm_machine_restart(mode, cmd);
 }