diff options
author | Kumar Gala <galak@codeaurora.org> | 2014-01-31 14:48:29 -0500 |
---|---|---|
committer | Kumar Gala <galak@codeaurora.org> | 2014-02-04 17:25:11 -0500 |
commit | 6a032dba7d2329084dca41cc8d82c0cda13103ef (patch) | |
tree | 7b6fbd5909af94bd44d2fbb526f4bfd050e3380a /arch/arm | |
parent | 52b52b4681df8bad450692cf3fa8a61ca1e1599a (diff) |
ARM: msm: kill off hotplug.c
Right now hotplug.c only really implements msm_cpu_die as a wfi. Just
move that implementation into platsmp.c. At the same time we use the
existing wfi() instead of inline asm.
Signed-off-by: Kumar Gala <galak@codeaurora.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-msm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/hotplug.c | 51 | ||||
-rw-r--r-- | arch/arm/mach-msm/platsmp.c | 7 |
4 files changed, 7 insertions, 53 deletions
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 721f27f50d96..8327f603df4c 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
@@ -18,7 +18,6 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o | |||
18 | 18 | ||
19 | CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) | 19 | CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) |
20 | 20 | ||
21 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
22 | obj-$(CONFIG_SMP) += platsmp.o | 21 | obj-$(CONFIG_SMP) += platsmp.o |
23 | 22 | ||
24 | obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o | 23 | obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o |
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h index 33c7725adae2..0a4899b7d85c 100644 --- a/arch/arm/mach-msm/common.h +++ b/arch/arm/mach-msm/common.h | |||
@@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size, | |||
24 | unsigned int mtype, void *caller); | 24 | unsigned int mtype, void *caller); |
25 | 25 | ||
26 | extern struct smp_operations msm_smp_ops; | 26 | extern struct smp_operations msm_smp_ops; |
27 | extern void msm_cpu_die(unsigned int cpu); | ||
28 | 27 | ||
29 | struct msm_mmc_platform_data; | 28 | struct msm_mmc_platform_data; |
30 | 29 | ||
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c deleted file mode 100644 index cea80fc6e48e..000000000000 --- a/arch/arm/mach-msm/hotplug.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 ARM Ltd. | ||
3 | * All Rights Reserved | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/errno.h> | ||
11 | #include <linux/smp.h> | ||
12 | |||
13 | #include <asm/smp_plat.h> | ||
14 | |||
15 | #include "common.h" | ||
16 | |||
17 | static inline void cpu_enter_lowpower(void) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | static inline void cpu_leave_lowpower(void) | ||
22 | { | ||
23 | } | ||
24 | |||
25 | static inline void platform_do_lowpower(unsigned int cpu) | ||
26 | { | ||
27 | asm("wfi" | ||
28 | : | ||
29 | : | ||
30 | : "memory", "cc"); | ||
31 | } | ||
32 | |||
33 | /* | ||
34 | * platform-specific code to shutdown a CPU | ||
35 | * | ||
36 | * Called with IRQs disabled | ||
37 | */ | ||
38 | void __ref msm_cpu_die(unsigned int cpu) | ||
39 | { | ||
40 | /* | ||
41 | * we're ready for shutdown now, so do it | ||
42 | */ | ||
43 | cpu_enter_lowpower(); | ||
44 | platform_do_lowpower(cpu); | ||
45 | |||
46 | /* | ||
47 | * bring this CPU back into the world of cache | ||
48 | * coherency, and then restore interrupts | ||
49 | */ | ||
50 | cpu_leave_lowpower(); | ||
51 | } | ||
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 3721b31ef6ae..251a91eb102a 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -29,6 +29,13 @@ extern void secondary_startup(void); | |||
29 | 29 | ||
30 | static DEFINE_SPINLOCK(boot_lock); | 30 | static DEFINE_SPINLOCK(boot_lock); |
31 | 31 | ||
32 | #ifdef CONFIG_HOTPLUG_CPU | ||
33 | static void __ref msm_cpu_die(unsigned int cpu) | ||
34 | { | ||
35 | wfi(); | ||
36 | } | ||
37 | #endif | ||
38 | |||
32 | static inline int get_core_count(void) | 39 | static inline int get_core_count(void) |
33 | { | 40 | { |
34 | /* 1 + the PART[1:0] field of MIDR */ | 41 | /* 1 + the PART[1:0] field of MIDR */ |