diff options
Diffstat (limited to 'arch/um/kernel/smp.c')
-rw-r--r-- | arch/um/kernel/smp.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c index 759b07053160..e6a7778006ad 100644 --- a/arch/um/kernel/smp.c +++ b/arch/um/kernel/smp.c | |||
@@ -21,7 +21,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
21 | #include "asm/smp.h" | 21 | #include "asm/smp.h" |
22 | #include "asm/processor.h" | 22 | #include "asm/processor.h" |
23 | #include "asm/spinlock.h" | 23 | #include "asm/spinlock.h" |
24 | #include "user_util.h" | ||
25 | #include "kern_util.h" | 24 | #include "kern_util.h" |
26 | #include "kern.h" | 25 | #include "kern.h" |
27 | #include "irq_user.h" | 26 | #include "irq_user.h" |
@@ -90,7 +89,7 @@ static int idle_proc(void *cpup) | |||
90 | 89 | ||
91 | cpu_set(cpu, cpu_online_map); | 90 | cpu_set(cpu, cpu_online_map); |
92 | default_idle(); | 91 | default_idle(); |
93 | return(0); | 92 | return 0; |
94 | } | 93 | } |
95 | 94 | ||
96 | static struct task_struct *idle_thread(int cpu) | 95 | static struct task_struct *idle_thread(int cpu) |
@@ -98,8 +97,8 @@ static struct task_struct *idle_thread(int cpu) | |||
98 | struct task_struct *new_task; | 97 | struct task_struct *new_task; |
99 | unsigned char c; | 98 | unsigned char c; |
100 | 99 | ||
101 | current->thread.request.u.thread.proc = idle_proc; | 100 | current->thread.request.u.thread.proc = idle_proc; |
102 | current->thread.request.u.thread.arg = (void *) cpu; | 101 | current->thread.request.u.thread.arg = (void *) cpu; |
103 | new_task = fork_idle(cpu); | 102 | new_task = fork_idle(cpu); |
104 | if(IS_ERR(new_task)) | 103 | if(IS_ERR(new_task)) |
105 | panic("copy_process failed in idle_thread, error = %ld", | 104 | panic("copy_process failed in idle_thread, error = %ld", |
@@ -110,9 +109,9 @@ static struct task_struct *idle_thread(int cpu) | |||
110 | .task = new_task } ); | 109 | .task = new_task } ); |
111 | idle_threads[cpu] = new_task; | 110 | idle_threads[cpu] = new_task; |
112 | CHOOSE_MODE(os_write_file(new_task->thread.mode.tt.switch_pipe[1], &c, | 111 | CHOOSE_MODE(os_write_file(new_task->thread.mode.tt.switch_pipe[1], &c, |
113 | sizeof(c)), | 112 | sizeof(c)), |
114 | ({ panic("skas mode doesn't support SMP"); })); | 113 | ({ panic("skas mode doesn't support SMP"); })); |
115 | return(new_task); | 114 | return new_task; |
116 | } | 115 | } |
117 | 116 | ||
118 | void smp_prepare_cpus(unsigned int maxcpus) | 117 | void smp_prepare_cpus(unsigned int maxcpus) |
@@ -163,13 +162,13 @@ int __cpu_up(unsigned int cpu) | |||
163 | cpu_set(cpu, smp_commenced_mask); | 162 | cpu_set(cpu, smp_commenced_mask); |
164 | while (!cpu_isset(cpu, cpu_online_map)) | 163 | while (!cpu_isset(cpu, cpu_online_map)) |
165 | mb(); | 164 | mb(); |
166 | return(0); | 165 | return 0; |
167 | } | 166 | } |
168 | 167 | ||
169 | int setup_profiling_timer(unsigned int multiplier) | 168 | int setup_profiling_timer(unsigned int multiplier) |
170 | { | 169 | { |
171 | printk(KERN_INFO "setup_profiling_timer\n"); | 170 | printk(KERN_INFO "setup_profiling_timer\n"); |
172 | return(0); | 171 | return 0; |
173 | } | 172 | } |
174 | 173 | ||
175 | void smp_call_function_slave(int cpu); | 174 | void smp_call_function_slave(int cpu); |
@@ -205,7 +204,7 @@ void IPI_handler(int cpu) | |||
205 | 204 | ||
206 | int hard_smp_processor_id(void) | 205 | int hard_smp_processor_id(void) |
207 | { | 206 | { |
208 | return(pid_to_processor_id(os_getpid())); | 207 | return pid_to_processor_id(os_getpid()); |
209 | } | 208 | } |
210 | 209 | ||
211 | static DEFINE_SPINLOCK(call_lock); | 210 | static DEFINE_SPINLOCK(call_lock); |
@@ -254,14 +253,3 @@ int smp_call_function(void (*_func)(void *info), void *_info, int nonatomic, | |||
254 | } | 253 | } |
255 | 254 | ||
256 | #endif | 255 | #endif |
257 | |||
258 | /* | ||
259 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
260 | * Emacs will notice this stuff at the end of the file and automatically | ||
261 | * adjust the settings for this buffer only. This must remain at the end | ||
262 | * of the file. | ||
263 | * --------------------------------------------------------------------------- | ||
264 | * Local variables: | ||
265 | * c-file-style: "linux" | ||
266 | * End: | ||
267 | */ | ||