linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped
@ 2011-08-15 17:34 Will Deacon
  2011-08-16  6:46 ` Heiko Stübner
  0 siblings, 1 reply; 2+ messages in thread
From: Will Deacon @ 2011-08-15 17:34 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/plat-s3c24xx/cpu.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index c1fc6c6..528930c 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -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);
 }
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped
  2011-08-15 17:34 [PATCH] ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped Will Deacon
@ 2011-08-16  6:46 ` Heiko Stübner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2011-08-16  6:46 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 15. August 2011, 19:34:22 schrieb Will Deacon:
> 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.
I'm not 100% sure, but you might want to include Kukjin Kim 
<kgene.kim@samsung.com> who seems to be handling the Samsung-stuff most of the 
time.

> 
> Cc: Ben Dooks <ben-linux@fluff.org>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm/plat-s3c24xx/cpu.c |   12 ------------
>  1 files changed, 0 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
> index c1fc6c6..528930c 100644
> --- a/arch/arm/plat-s3c24xx/cpu.c
> +++ b/arch/arm/plat-s3c24xx/cpu.c
> @@ -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);
>  }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-16  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 17:34 [PATCH] ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped Will Deacon
2011-08-16  6:46 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).