From 9e0e071ed1f511016fae774eb8ca707fc9c42878 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Tue, 20 Sep 2011 18:45:53 -0700 Subject: ARM: tegra: power: Flush cache just before cpu shutdown Re-arranged cpu die procedure to flush L1 cache just before shutdown. This is necessary as code executed after L1 flush included spin-lock protected sections, and the unlock operation was not properly detected by SCU. As a result CPUs that stayed on-line hanged trying to acquire the same spin-lock. Bug 864256 Change-Id: I415160d60686094059e62d91cdcf4b264a4fb69f Reviewed-on: http://git-master/r/53637 Tested-by: Aleksandr Frid Reviewed-by: Krishna Reddy Tested-by: Gaurav Sarode Reviewed-by: Scott Williams Rebase-Id: R0663eac9b5c3c84d8b7380873bde6af6b2a74a9f --- arch/arm/mach-tegra/hotplug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-tegra/hotplug.c') diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index 6fb618e7841b..d44e457e7182 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c @@ -53,10 +53,10 @@ int platform_cpu_kill(unsigned int cpu) void platform_cpu_die(unsigned int cpu) { +#ifdef CONFIG_ARCH_TEGRA_2x_SOC /* Flush the L1 data cache. */ flush_cache_all(); -#ifdef CONFIG_ARCH_TEGRA_2x_SOC /* Place the current CPU in reset. */ tegra2_hotplug_shutdown(); #else @@ -69,6 +69,9 @@ void platform_cpu_die(unsigned int cpu) have affinity to this CPU. */ tegra_gic_pass_through_disable(); + /* Flush the L1 data cache. */ + flush_cache_all(); + /* Shut down the current CPU. */ tegra3_hotplug_shutdown(); #endif -- cgit v1.2.3