diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/kernel/init_task.c | 37 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 20 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 26 |
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 | |||
82 | obj-$(CONFIG_DEBUG_LL) += debug.o | 82 | obj-$(CONFIG_DEBUG_LL) += debug.o |
83 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 83 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
84 | 84 | ||
85 | extra-y := $(head-y) init_task.o vmlinux.lds | 85 | extra-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 | |||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
16 | static 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 | */ | ||
27 | union 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 | */ | ||
35 | struct task_struct init_task = INIT_TASK(init_task); | ||
36 | |||
37 | EXPORT_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); | |||
157 | void (*arm_pm_restart)(char str, const char *cmd) = null_restart; | 157 | void (*arm_pm_restart)(char str, const char *cmd) = null_restart; |
158 | EXPORT_SYMBOL_GPL(arm_pm_restart); | 158 | EXPORT_SYMBOL_GPL(arm_pm_restart); |
159 | 159 | ||
160 | static 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 | */ | ||
172 | void 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 | } | ||
178 | EXPORT_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 | ||
61 | static DECLARE_COMPLETION(cpu_running); | 61 | static DECLARE_COMPLETION(cpu_running); |
62 | 62 | ||
63 | int __cpuinit __cpu_up(unsigned int cpu) | 63 | int __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 | ||
319 | void __init smp_prepare_boot_cpu(void) | 298 | void __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 | ||
326 | void __init smp_prepare_cpus(unsigned int max_cpus) | 302 | void __init smp_prepare_cpus(unsigned int max_cpus) |