kernel: update 3.14 to 3.14.18
[openwrt.git] / target / linux / ipq806x / patches / 0003-ARM-msm-kill-off-hotplug.c.patch
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
5
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.
9
10 Signed-off-by: Kumar Gala <galak@codeaurora.org>
11 ---
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
18
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.
22  
23  CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
24  
25 -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
26  obj-$(CONFIG_SMP) += platsmp.o
27  
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);
33  
34  extern struct smp_operations msm_smp_ops;
35 -extern void msm_cpu_die(unsigned int cpu);
36  
37  struct msm_mmc_platform_data;
38  
39 --- a/arch/arm/mach-msm/hotplug.c
40 +++ /dev/null
41 @@ -1,51 +0,0 @@
42 -/*
43 - *  Copyright (C) 2002 ARM Ltd.
44 - *  All Rights Reserved
45 - *
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.
49 - */
50 -#include <linux/kernel.h>
51 -#include <linux/errno.h>
52 -#include <linux/smp.h>
53 -
54 -#include <asm/smp_plat.h>
55 -
56 -#include "common.h"
57 -
58 -static inline void cpu_enter_lowpower(void)
59 -{
60 -}
61 -
62 -static inline void cpu_leave_lowpower(void)
63 -{
64 -}
65 -
66 -static inline void platform_do_lowpower(unsigned int cpu)
67 -{
68 -       asm("wfi"
69 -           :
70 -           :
71 -           : "memory", "cc");
72 -}
73 -
74 -/*
75 - * platform-specific code to shutdown a CPU
76 - *
77 - * Called with IRQs disabled
78 - */
79 -void __ref msm_cpu_die(unsigned int cpu)
80 -{
81 -       /*
82 -        * we're ready for shutdown now, so do it
83 -        */
84 -       cpu_enter_lowpower();
85 -       platform_do_lowpower(cpu);
86 -
87 -       /*
88 -        * bring this CPU back into the world of cache
89 -        * coherency, and then restore interrupts
90 -        */
91 -       cpu_leave_lowpower();
92 -}
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);
96  
97  static DEFINE_SPINLOCK(boot_lock);
98  
99 +#ifdef CONFIG_HOTPLUG_CPU
100 +static void __ref msm_cpu_die(unsigned int cpu)
101 +{
102 +       wfi();
103 +}
104 +#endif
105 +
106  static inline int get_core_count(void)
107  {
108         /* 1 + the PART[1:0] field of MIDR */