aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-06-18 10:18:31 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-07-14 19:36:52 -0400
commitb8c6453aaf142620c2e1a4c2da24bbb10cb424bf (patch)
tree274c3c3d60bd8575fb711d04e4b30164a90cb9f6
parent2066aadd53c563445039d6490b685783816270ec (diff)
arm64: delete __cpuinit usage from all users
The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) are flagged as __cpuinit -- so if we remove the __cpuinit from arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. This removes all the arch/arm64 uses of the __cpuinit macros from all C files. Currently arm64 does not have any __CPUINIT used in assembly files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--arch/arm64/include/asm/arch_timer.h2
-rw-r--r--arch/arm64/kernel/debug-monitors.c6
-rw-r--r--arch/arm64/kernel/hw_breakpoint.c4
-rw-r--r--arch/arm64/kernel/smp.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h
index d56ed11ba9a3..98abd476992d 100644
--- a/arch/arm64/include/asm/arch_timer.h
+++ b/arch/arm64/include/asm/arch_timer.h
@@ -97,7 +97,7 @@ static inline u32 arch_timer_get_cntfrq(void)
97 return val; 97 return val;
98} 98}
99 99
100static inline void __cpuinit arch_counter_set_user_access(void) 100static inline void arch_counter_set_user_access(void)
101{ 101{
102 u32 cntkctl; 102 u32 cntkctl;
103 103
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index 08018e3df580..cbfacf7fb438 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -141,7 +141,7 @@ static void clear_os_lock(void *unused)
141 isb(); 141 isb();
142} 142}
143 143
144static int __cpuinit os_lock_notify(struct notifier_block *self, 144static int os_lock_notify(struct notifier_block *self,
145 unsigned long action, void *data) 145 unsigned long action, void *data)
146{ 146{
147 int cpu = (unsigned long)data; 147 int cpu = (unsigned long)data;
@@ -150,11 +150,11 @@ static int __cpuinit os_lock_notify(struct notifier_block *self,
150 return NOTIFY_OK; 150 return NOTIFY_OK;
151} 151}
152 152
153static struct notifier_block __cpuinitdata os_lock_nb = { 153static struct notifier_block os_lock_nb = {
154 .notifier_call = os_lock_notify, 154 .notifier_call = os_lock_notify,
155}; 155};
156 156
157static int __cpuinit debug_monitors_init(void) 157static int debug_monitors_init(void)
158{ 158{
159 /* Clear the OS lock. */ 159 /* Clear the OS lock. */
160 smp_call_function(clear_os_lock, NULL, 1); 160 smp_call_function(clear_os_lock, NULL, 1);
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index 5ab825c59db9..329218ca9ffb 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -821,7 +821,7 @@ static void reset_ctrl_regs(void *unused)
821 } 821 }
822} 822}
823 823
824static int __cpuinit hw_breakpoint_reset_notify(struct notifier_block *self, 824static int hw_breakpoint_reset_notify(struct notifier_block *self,
825 unsigned long action, 825 unsigned long action,
826 void *hcpu) 826 void *hcpu)
827{ 827{
@@ -831,7 +831,7 @@ static int __cpuinit hw_breakpoint_reset_notify(struct notifier_block *self,
831 return NOTIFY_OK; 831 return NOTIFY_OK;
832} 832}
833 833
834static struct notifier_block __cpuinitdata hw_breakpoint_reset_nb = { 834static struct notifier_block hw_breakpoint_reset_nb = {
835 .notifier_call = hw_breakpoint_reset_notify, 835 .notifier_call = hw_breakpoint_reset_notify,
836}; 836};
837 837
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 5d54e3717bf8..4a053b3d1728 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -71,7 +71,7 @@ static DEFINE_RAW_SPINLOCK(boot_lock);
71 * in coherency or not. This is necessary for the hotplug code to work 71 * in coherency or not. This is necessary for the hotplug code to work
72 * reliably. 72 * reliably.
73 */ 73 */
74static void __cpuinit write_pen_release(u64 val) 74static void write_pen_release(u64 val)
75{ 75{
76 void *start = (void *)&secondary_holding_pen_release; 76 void *start = (void *)&secondary_holding_pen_release;
77 unsigned long size = sizeof(secondary_holding_pen_release); 77 unsigned long size = sizeof(secondary_holding_pen_release);
@@ -84,7 +84,7 @@ static void __cpuinit write_pen_release(u64 val)
84 * Boot a secondary CPU, and assign it the specified idle task. 84 * Boot a secondary CPU, and assign it the specified idle task.
85 * This also gives us the initial stack to use for this CPU. 85 * This also gives us the initial stack to use for this CPU.
86 */ 86 */
87static int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) 87static int boot_secondary(unsigned int cpu, struct task_struct *idle)
88{ 88{
89 unsigned long timeout; 89 unsigned long timeout;
90 90
@@ -122,7 +122,7 @@ static int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
122 122
123static DECLARE_COMPLETION(cpu_running); 123static DECLARE_COMPLETION(cpu_running);
124 124
125int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) 125int __cpu_up(unsigned int cpu, struct task_struct *idle)
126{ 126{
127 int ret; 127 int ret;
128 128
@@ -162,7 +162,7 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
162 * This is the secondary CPU boot entry. We're using this CPUs 162 * This is the secondary CPU boot entry. We're using this CPUs
163 * idle thread stack, but a set of temporary page tables. 163 * idle thread stack, but a set of temporary page tables.
164 */ 164 */
165asmlinkage void __cpuinit secondary_start_kernel(void) 165asmlinkage void secondary_start_kernel(void)
166{ 166{
167 struct mm_struct *mm = &init_mm; 167 struct mm_struct *mm = &init_mm;
168 unsigned int cpu = smp_processor_id(); 168 unsigned int cpu = smp_processor_id();