diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-04-18 13:15:44 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-04-18 15:08:04 -0400 |
| commit | bca7a5a04933700a8bde4ea5798119607a8b0436 (patch) | |
| tree | 9d1c2663fa2cd60d434d1603d192bbba3ae3d706 | |
| parent | 51acdfd1fa38a2bf1003255be9f105c19fbc0176 (diff) | |
ARM: cpu hotplug: remove majority of cache flushing from platforms
Remove the majority of cache flushing calls from the individual platform
files. This is now handled by the core code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| -rw-r--r-- | arch/arm/mach-exynos/hotplug.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-highbank/hotplug.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-imx/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-msm/hotplug.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap-hotplug.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-prima2/hotplug.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/smp-sh73a0.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-spear13xx/hotplug.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-tegra/hotplug.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/hotplug.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-vexpress/hotplug.c | 2 |
12 files changed, 0 insertions, 35 deletions
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index c3f825b27947..af90cfa2f826 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
| @@ -28,7 +28,6 @@ static inline void cpu_enter_lowpower_a9(void) | |||
| 28 | { | 28 | { |
| 29 | unsigned int v; | 29 | unsigned int v; |
| 30 | 30 | ||
| 31 | flush_cache_all(); | ||
| 32 | asm volatile( | 31 | asm volatile( |
| 33 | " mcr p15, 0, %1, c7, c5, 0\n" | 32 | " mcr p15, 0, %1, c7, c5, 0\n" |
| 34 | " mcr p15, 0, %1, c7, c10, 4\n" | 33 | " mcr p15, 0, %1, c7, c10, 4\n" |
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c index f30c52843396..35dd42e21685 100644 --- a/arch/arm/mach-highbank/hotplug.c +++ b/arch/arm/mach-highbank/hotplug.c | |||
| @@ -15,8 +15,6 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 17 | 17 | ||
| 18 | #include <asm/cacheflush.h> | ||
| 19 | |||
| 20 | #include "core.h" | 18 | #include "core.h" |
| 21 | #include "sysregs.h" | 19 | #include "sysregs.h" |
| 22 | 20 | ||
| @@ -28,8 +26,6 @@ extern void secondary_startup(void); | |||
| 28 | */ | 26 | */ |
| 29 | void __ref highbank_cpu_die(unsigned int cpu) | 27 | void __ref highbank_cpu_die(unsigned int cpu) |
| 30 | { | 28 | { |
| 31 | flush_cache_all(); | ||
| 32 | |||
| 33 | highbank_set_cpu_jump(cpu, phys_to_virt(0)); | 29 | highbank_set_cpu_jump(cpu, phys_to_virt(0)); |
| 34 | highbank_set_core_pwr(); | 30 | highbank_set_core_pwr(); |
| 35 | 31 | ||
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 361a253e2b63..5e91112dcbee 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
| 14 | #include <asm/cacheflush.h> | ||
| 15 | #include <asm/cp15.h> | 14 | #include <asm/cp15.h> |
| 16 | 15 | ||
| 17 | #include "common.h" | 16 | #include "common.h" |
| @@ -20,7 +19,6 @@ static inline void cpu_enter_lowpower(void) | |||
| 20 | { | 19 | { |
| 21 | unsigned int v; | 20 | unsigned int v; |
| 22 | 21 | ||
| 23 | flush_cache_all(); | ||
| 24 | asm volatile( | 22 | asm volatile( |
| 25 | "mcr p15, 0, %1, c7, c5, 0\n" | 23 | "mcr p15, 0, %1, c7, c5, 0\n" |
| 26 | " mcr p15, 0, %1, c7, c10, 4\n" | 24 | " mcr p15, 0, %1, c7, c10, 4\n" |
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c index 750446feb444..326a87261f9a 100644 --- a/arch/arm/mach-msm/hotplug.c +++ b/arch/arm/mach-msm/hotplug.c | |||
| @@ -10,16 +10,12 @@ | |||
| 10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
| 11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
| 12 | 12 | ||
| 13 | #include <asm/cacheflush.h> | ||
| 14 | #include <asm/smp_plat.h> | 13 | #include <asm/smp_plat.h> |
| 15 | 14 | ||
| 16 | #include "common.h" | 15 | #include "common.h" |
| 17 | 16 | ||
| 18 | static inline void cpu_enter_lowpower(void) | 17 | static inline void cpu_enter_lowpower(void) |
| 19 | { | 18 | { |
| 20 | /* Just flush the cache. Changing the coherency is not yet | ||
| 21 | * available on msm. */ | ||
| 22 | flush_cache_all(); | ||
| 23 | } | 19 | } |
| 24 | 20 | ||
| 25 | static inline void cpu_leave_lowpower(void) | 21 | static inline void cpu_leave_lowpower(void) |
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c index e712d1725a8b..ceb30a59bf28 100644 --- a/arch/arm/mach-omap2/omap-hotplug.c +++ b/arch/arm/mach-omap2/omap-hotplug.c | |||
| @@ -35,9 +35,6 @@ void __ref omap4_cpu_die(unsigned int cpu) | |||
| 35 | unsigned int boot_cpu = 0; | 35 | unsigned int boot_cpu = 0; |
| 36 | void __iomem *base = omap_get_wakeupgen_base(); | 36 | void __iomem *base = omap_get_wakeupgen_base(); |
| 37 | 37 | ||
| 38 | flush_cache_all(); | ||
| 39 | dsb(); | ||
| 40 | |||
| 41 | /* | 38 | /* |
| 42 | * we're ready for shutdown now, so do it | 39 | * we're ready for shutdown now, so do it |
| 43 | */ | 40 | */ |
diff --git a/arch/arm/mach-prima2/hotplug.c b/arch/arm/mach-prima2/hotplug.c index f4b17cbababd..0ab2f8bae28e 100644 --- a/arch/arm/mach-prima2/hotplug.c +++ b/arch/arm/mach-prima2/hotplug.c | |||
| @@ -10,13 +10,10 @@ | |||
| 10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
| 11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
| 12 | 12 | ||
| 13 | #include <asm/cacheflush.h> | ||
| 14 | #include <asm/smp_plat.h> | 13 | #include <asm/smp_plat.h> |
| 15 | 14 | ||
| 16 | static inline void platform_do_lowpower(unsigned int cpu) | 15 | static inline void platform_do_lowpower(unsigned int cpu) |
| 17 | { | 16 | { |
| 18 | flush_cache_all(); | ||
| 19 | |||
| 20 | /* we put the platform to just WFI */ | 17 | /* we put the platform to just WFI */ |
| 21 | for (;;) { | 18 | for (;;) { |
| 22 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" | 19 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" |
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index 53818e5cd3ad..ac22dd41b135 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| 13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
| 14 | 14 | ||
| 15 | #include <asm/cacheflush.h> | ||
| 16 | #include <asm/cp15.h> | 15 | #include <asm/cp15.h> |
| 17 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
| 18 | 17 | ||
| @@ -20,7 +19,6 @@ static inline void cpu_enter_lowpower(void) | |||
| 20 | { | 19 | { |
| 21 | unsigned int v; | 20 | unsigned int v; |
| 22 | 21 | ||
| 23 | flush_cache_all(); | ||
| 24 | asm volatile( | 22 | asm volatile( |
| 25 | " mcr p15, 0, %1, c7, c5, 0\n" | 23 | " mcr p15, 0, %1, c7, c5, 0\n" |
| 26 | " mcr p15, 0, %1, c7, c10, 4\n" | 24 | " mcr p15, 0, %1, c7, c10, 4\n" |
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index acb46a94ccdf..2f1ef1bc805d 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
| @@ -119,14 +119,6 @@ static int sh73a0_cpu_kill(unsigned int cpu) | |||
| 119 | 119 | ||
| 120 | static void sh73a0_cpu_die(unsigned int cpu) | 120 | static void sh73a0_cpu_die(unsigned int cpu) |
| 121 | { | 121 | { |
| 122 | /* | ||
| 123 | * The ARM MPcore does not issue a cache coherency request for the L1 | ||
| 124 | * cache when powering off single CPUs. We must take care of this and | ||
| 125 | * further caches. | ||
| 126 | */ | ||
| 127 | dsb(); | ||
| 128 | flush_cache_all(); | ||
| 129 | |||
| 130 | /* Set power off mode. This takes the CPU out of the MP cluster */ | 122 | /* Set power off mode. This takes the CPU out of the MP cluster */ |
| 131 | scu_power_mode(scu_base_addr(), SCU_PM_POWEROFF); | 123 | scu_power_mode(scu_base_addr(), SCU_PM_POWEROFF); |
| 132 | 124 | ||
diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c index a7d2dd11a4f2..d97749c642ce 100644 --- a/arch/arm/mach-spear13xx/hotplug.c +++ b/arch/arm/mach-spear13xx/hotplug.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
| 15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
| 16 | #include <asm/cacheflush.h> | ||
| 17 | #include <asm/cp15.h> | 16 | #include <asm/cp15.h> |
| 18 | #include <asm/smp_plat.h> | 17 | #include <asm/smp_plat.h> |
| 19 | 18 | ||
| @@ -21,7 +20,6 @@ static inline void cpu_enter_lowpower(void) | |||
| 21 | { | 20 | { |
| 22 | unsigned int v; | 21 | unsigned int v; |
| 23 | 22 | ||
| 24 | flush_cache_all(); | ||
| 25 | asm volatile( | 23 | asm volatile( |
| 26 | " mcr p15, 0, %1, c7, c5, 0\n" | 24 | " mcr p15, 0, %1, c7, c5, 0\n" |
| 27 | " dsb\n" | 25 | " dsb\n" |
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index 1fb9915f7895..e8323bc95770 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
| 13 | #include <linux/clk/tegra.h> | 13 | #include <linux/clk/tegra.h> |
| 14 | 14 | ||
| 15 | #include <asm/cacheflush.h> | ||
| 16 | #include <asm/smp_plat.h> | 15 | #include <asm/smp_plat.h> |
| 17 | 16 | ||
| 18 | #include "sleep.h" | 17 | #include "sleep.h" |
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c index 2f6af259015d..1c55a55dd89e 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| 13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
| 14 | 14 | ||
| 15 | #include <asm/cacheflush.h> | ||
| 16 | #include <asm/smp_plat.h> | 15 | #include <asm/smp_plat.h> |
| 17 | 16 | ||
| 18 | #include <mach/setup.h> | 17 | #include <mach/setup.h> |
| @@ -24,8 +23,6 @@ | |||
| 24 | */ | 23 | */ |
| 25 | void __ref ux500_cpu_die(unsigned int cpu) | 24 | void __ref ux500_cpu_die(unsigned int cpu) |
| 26 | { | 25 | { |
| 27 | flush_cache_all(); | ||
| 28 | |||
| 29 | /* directly enter low power state, skipping secure registers */ | 26 | /* directly enter low power state, skipping secure registers */ |
| 30 | for (;;) { | 27 | for (;;) { |
| 31 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" | 28 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" |
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c index a141b98d84fe..f0ce6b8f5e71 100644 --- a/arch/arm/mach-vexpress/hotplug.c +++ b/arch/arm/mach-vexpress/hotplug.c | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| 13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
| 14 | 14 | ||
| 15 | #include <asm/cacheflush.h> | ||
| 16 | #include <asm/smp_plat.h> | 15 | #include <asm/smp_plat.h> |
| 17 | #include <asm/cp15.h> | 16 | #include <asm/cp15.h> |
| 18 | 17 | ||
| @@ -20,7 +19,6 @@ static inline void cpu_enter_lowpower(void) | |||
| 20 | { | 19 | { |
| 21 | unsigned int v; | 20 | unsigned int v; |
| 22 | 21 | ||
| 23 | flush_cache_all(); | ||
| 24 | asm volatile( | 22 | asm volatile( |
| 25 | "mcr p15, 0, %1, c7, c5, 0\n" | 23 | "mcr p15, 0, %1, c7, c5, 0\n" |
| 26 | " mcr p15, 0, %1, c7, c10, 4\n" | 24 | " mcr p15, 0, %1, c7, c10, 4\n" |
