aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 22:43:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 22:43:57 -0400
commitbf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (patch)
tree2a2324b2572162059307db82f9238eeb25673a77 /arch/arm/kernel
parent226da0dbc84ed97f448523e2a4cb91c27fa68ed9 (diff)
parent203dacbdca977bedaba61ad2fca75d934060a5d5 (diff)
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp hotplug cleanups from Thomas Gleixner: "This series is merily a cleanup of code copied around in arch/* and not changing any of the real cpu hotplug horrors yet. I wish I'd had something more substantial for 3.5, but I underestimated the lurking horror..." Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and arch/sparc/include/asm/thread_info_32.h * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits) um: Remove leftover declaration of alloc_task_struct_node() task_allocator: Use config switches instead of magic defines sparc: Use common threadinfo allocator score: Use common threadinfo allocator sh-use-common-threadinfo-allocator mn10300: Use common threadinfo allocator powerpc: Use common threadinfo allocator mips: Use common threadinfo allocator hexagon: Use common threadinfo allocator m32r: Use common threadinfo allocator frv: Use common threadinfo allocator cris: Use common threadinfo allocator x86: Use common threadinfo allocator c6x: Use common threadinfo allocator fork: Provide kmemcache based thread_info allocator tile: Use common threadinfo allocator fork: Provide weak arch_release_[task_struct|thread_info] functions fork: Move thread info gfp flags to header fork: Remove the weak insanity sh: Remove cpu_idle_wait() ...
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/Makefile2
-rw-r--r--arch/arm/kernel/init_task.c37
-rw-r--r--arch/arm/kernel/process.c20
-rw-r--r--arch/arm/kernel/smp.c26
4 files changed, 2 insertions, 83 deletions
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 22b0f1e255f0..7ad2d5cf7008 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -82,4 +82,4 @@ head-y := head$(MMUEXT).o
82obj-$(CONFIG_DEBUG_LL) += debug.o 82obj-$(CONFIG_DEBUG_LL) += debug.o
83obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 83obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
84 84
85extra-y := $(head-y) init_task.o vmlinux.lds 85extra-y := $(head-y) vmlinux.lds
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c
deleted file mode 100644
index e7cbb50dc356..000000000000
--- a/arch/arm/kernel/init_task.c
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/arch/arm/kernel/init_task.c
3 */
4#include <linux/mm.h>
5#include <linux/module.h>
6#include <linux/fs.h>
7#include <linux/sched.h>
8#include <linux/init.h>
9#include <linux/init_task.h>
10#include <linux/mqueue.h>
11#include <linux/uaccess.h>
12
13#include <asm/pgtable.h>
14
15static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
16static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
17/*
18 * Initial thread structure.
19 *
20 * We need to make sure that this is 8192-byte aligned due to the
21 * way process stacks are handled. This is done by making sure
22 * the linker maps this in the .text segment right after head.S,
23 * and making head.S ensure the proper alignment.
24 *
25 * The things we do for performance..
26 */
27union thread_union init_thread_union __init_task_data =
28 { INIT_THREAD_INFO(init_task) };
29
30/*
31 * Initial task structure.
32 *
33 * All other task structs will be allocated on slabs in fork.c
34 */
35struct task_struct init_task = INIT_TASK(init_task);
36
37EXPORT_SYMBOL(init_task);
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 2b7b017a20cd..19c95ea65b2f 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -157,26 +157,6 @@ EXPORT_SYMBOL(pm_power_off);
157void (*arm_pm_restart)(char str, const char *cmd) = null_restart; 157void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
158EXPORT_SYMBOL_GPL(arm_pm_restart); 158EXPORT_SYMBOL_GPL(arm_pm_restart);
159 159
160static void do_nothing(void *unused)
161{
162}
163
164/*
165 * cpu_idle_wait - Used to ensure that all the CPUs discard old value of
166 * pm_idle and update to new pm_idle value. Required while changing pm_idle
167 * handler on SMP systems.
168 *
169 * Caller must have changed pm_idle to the new value before the call. Old
170 * pm_idle value will not be used by any CPU after the return of this function.
171 */
172void cpu_idle_wait(void)
173{
174 smp_mb();
175 /* kick all the CPUs so that they exit out of pm_idle */
176 smp_call_function(do_nothing, NULL, 1);
177}
178EXPORT_SYMBOL_GPL(cpu_idle_wait);
179
180/* 160/*
181 * This is our default idle handler. 161 * This is our default idle handler.
182 */ 162 */
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index cf58558ef4b9..b735521a4a54 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -60,32 +60,11 @@ enum ipi_msg_type {
60 60
61static DECLARE_COMPLETION(cpu_running); 61static DECLARE_COMPLETION(cpu_running);
62 62
63int __cpuinit __cpu_up(unsigned int cpu) 63int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
64{ 64{
65 struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
66 struct task_struct *idle = ci->idle;
67 int ret; 65 int ret;
68 66
69 /* 67 /*
70 * Spawn a new process manually, if not already done.
71 * Grab a pointer to its task struct so we can mess with it
72 */
73 if (!idle) {
74 idle = fork_idle(cpu);
75 if (IS_ERR(idle)) {
76 printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
77 return PTR_ERR(idle);
78 }
79 ci->idle = idle;
80 } else {
81 /*
82 * Since this idle thread is being re-used, call
83 * init_idle() to reinitialize the thread structure.
84 */
85 init_idle(idle, cpu);
86 }
87
88 /*
89 * We need to tell the secondary core where to find 68 * We need to tell the secondary core where to find
90 * its stack and the page tables. 69 * its stack and the page tables.
91 */ 70 */
@@ -318,9 +297,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
318 297
319void __init smp_prepare_boot_cpu(void) 298void __init smp_prepare_boot_cpu(void)
320{ 299{
321 unsigned int cpu = smp_processor_id();
322
323 per_cpu(cpu_data, cpu).idle = current;
324} 300}
325 301
326void __init smp_prepare_cpus(unsigned int max_cpus) 302void __init smp_prepare_cpus(unsigned int max_cpus)