1 From b5a3a19e3efa6238c6a00a8f36a8ab2c25eeebc3 Mon Sep 17 00:00:00 2001
2 From: Kumar Gala <galak@codeaurora.org>
3 Date: Fri, 31 Jan 2014 13:48:29 -0600
4 Subject: [PATCH 003/182] ARM: msm: kill off hotplug.c
6 Right now hotplug.c only really implements msm_cpu_die as a wfi. Just
7 move that implementation into platsmp.c. At the same time we use the
8 existing wfi() instead of inline asm.
10 Signed-off-by: Kumar Gala <galak@codeaurora.org>
12 arch/arm/mach-msm/Makefile | 1 -
13 arch/arm/mach-msm/common.h | 1 -
14 arch/arm/mach-msm/hotplug.c | 51 -------------------------------------------
15 arch/arm/mach-msm/platsmp.c | 7 ++++++
16 4 files changed, 7 insertions(+), 53 deletions(-)
17 delete mode 100644 arch/arm/mach-msm/hotplug.c
19 diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
20 index 721f27f..8327f60 100644
21 --- a/arch/arm/mach-msm/Makefile
22 +++ b/arch/arm/mach-msm/Makefile
23 @@ -18,7 +18,6 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
25 CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
27 -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
28 obj-$(CONFIG_SMP) += platsmp.o
30 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
31 diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
32 index 33c7725..0a4899b 100644
33 --- a/arch/arm/mach-msm/common.h
34 +++ b/arch/arm/mach-msm/common.h
35 @@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
36 unsigned int mtype, void *caller);
38 extern struct smp_operations msm_smp_ops;
39 -extern void msm_cpu_die(unsigned int cpu);
41 struct msm_mmc_platform_data;
43 diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
44 deleted file mode 100644
45 index cea80fc..0000000
46 --- a/arch/arm/mach-msm/hotplug.c
50 - * Copyright (C) 2002 ARM Ltd.
51 - * All Rights Reserved
53 - * This program is free software; you can redistribute it and/or modify
54 - * it under the terms of the GNU General Public License version 2 as
55 - * published by the Free Software Foundation.
57 -#include <linux/kernel.h>
58 -#include <linux/errno.h>
59 -#include <linux/smp.h>
61 -#include <asm/smp_plat.h>
65 -static inline void cpu_enter_lowpower(void)
69 -static inline void cpu_leave_lowpower(void)
73 -static inline void platform_do_lowpower(unsigned int cpu)
82 - * platform-specific code to shutdown a CPU
84 - * Called with IRQs disabled
86 -void __ref msm_cpu_die(unsigned int cpu)
89 - * we're ready for shutdown now, so do it
91 - cpu_enter_lowpower();
92 - platform_do_lowpower(cpu);
95 - * bring this CPU back into the world of cache
96 - * coherency, and then restore interrupts
98 - cpu_leave_lowpower();
100 diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
101 index 3721b31..251a91e 100644
102 --- a/arch/arm/mach-msm/platsmp.c
103 +++ b/arch/arm/mach-msm/platsmp.c
104 @@ -29,6 +29,13 @@ extern void secondary_startup(void);
106 static DEFINE_SPINLOCK(boot_lock);
108 +#ifdef CONFIG_HOTPLUG_CPU
109 +static void __ref msm_cpu_die(unsigned int cpu)
115 static inline int get_core_count(void)
117 /* 1 + the PART[1:0] field of MIDR */