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 --- a/arch/arm/mach-msm/Makefile
20 +++ b/arch/arm/mach-msm/Makefile
21 @@ -18,7 +18,6 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.
23 CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
25 -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
26 obj-$(CONFIG_SMP) += platsmp.o
28 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
29 --- a/arch/arm/mach-msm/common.h
30 +++ b/arch/arm/mach-msm/common.h
31 @@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_calle
32 unsigned int mtype, void *caller);
34 extern struct smp_operations msm_smp_ops;
35 -extern void msm_cpu_die(unsigned int cpu);
37 struct msm_mmc_platform_data;
39 --- a/arch/arm/mach-msm/hotplug.c
43 - * Copyright (C) 2002 ARM Ltd.
44 - * All Rights Reserved
46 - * This program is free software; you can redistribute it and/or modify
47 - * it under the terms of the GNU General Public License version 2 as
48 - * published by the Free Software Foundation.
50 -#include <linux/kernel.h>
51 -#include <linux/errno.h>
52 -#include <linux/smp.h>
54 -#include <asm/smp_plat.h>
58 -static inline void cpu_enter_lowpower(void)
62 -static inline void cpu_leave_lowpower(void)
66 -static inline void platform_do_lowpower(unsigned int cpu)
75 - * platform-specific code to shutdown a CPU
77 - * Called with IRQs disabled
79 -void __ref msm_cpu_die(unsigned int cpu)
82 - * we're ready for shutdown now, so do it
84 - cpu_enter_lowpower();
85 - platform_do_lowpower(cpu);
88 - * bring this CPU back into the world of cache
89 - * coherency, and then restore interrupts
91 - cpu_leave_lowpower();
93 --- a/arch/arm/mach-msm/platsmp.c
94 +++ b/arch/arm/mach-msm/platsmp.c
95 @@ -29,6 +29,13 @@ extern void secondary_startup(void);
97 static DEFINE_SPINLOCK(boot_lock);
99 +#ifdef CONFIG_HOTPLUG_CPU
100 +static void __ref msm_cpu_die(unsigned int cpu)
106 static inline int get_core_count(void)
108 /* 1 + the PART[1:0] field of MIDR */