aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/smp.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:26:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:05 -0400
commit4c9e13851315a25a705e7a686116e491041ca228 (patch)
treea323e1dcfe89f6c9d7e873a1bf2ad7aab9cdb9e6 /arch/um/kernel/smp.c
parentc28b59d4779a43e9b7e786c7004cbee8fab1527d (diff)
uml: style fixes pass 1
Formatting changes in the files which have been changed in the tt-removal patchset so far. These include: copyright updates header file trimming style fixes adding severity to printks indenting Kconfig help according to the predominant kernel style These changes should be entirely non-functional. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/smp.c')
-rw-r--r--arch/um/kernel/smp.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 15bb54365779..36d89cf8d20b 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) 2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
@@ -56,12 +56,12 @@ void smp_send_stop(void)
56 int i; 56 int i;
57 57
58 printk(KERN_INFO "Stopping all CPUs..."); 58 printk(KERN_INFO "Stopping all CPUs...");
59 for(i = 0; i < num_online_cpus(); i++){ 59 for (i = 0; i < num_online_cpus(); i++) {
60 if(i == current_thread->cpu) 60 if (i == current_thread->cpu)
61 continue; 61 continue;
62 os_write_file(cpu_data[i].ipi_pipe[1], "S", 1); 62 os_write_file(cpu_data[i].ipi_pipe[1], "S", 1);
63 } 63 }
64 printk("done\n"); 64 printk(KERN_INFO "done\n");
65} 65}
66 66
67static cpumask_t smp_commenced_mask = CPU_MASK_NONE; 67static cpumask_t smp_commenced_mask = CPU_MASK_NONE;
@@ -72,7 +72,7 @@ static int idle_proc(void *cpup)
72 int cpu = (int) cpup, err; 72 int cpu = (int) cpup, err;
73 73
74 err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1); 74 err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1);
75 if(err < 0) 75 if (err < 0)
76 panic("CPU#%d failed to create IPI pipe, err = %d", cpu, -err); 76 panic("CPU#%d failed to create IPI pipe, err = %d", cpu, -err);
77 77
78 os_set_fd_async(cpu_data[cpu].ipi_pipe[0], 78 os_set_fd_async(cpu_data[cpu].ipi_pipe[0],
@@ -80,7 +80,7 @@ static int idle_proc(void *cpup)
80 80
81 wmb(); 81 wmb();
82 if (cpu_test_and_set(cpu, cpu_callin_map)) { 82 if (cpu_test_and_set(cpu, cpu_callin_map)) {
83 printk("huh, CPU#%d already present??\n", cpu); 83 printk(KERN_ERR "huh, CPU#%d already present??\n", cpu);
84 BUG(); 84 BUG();
85 } 85 }
86 86
@@ -99,7 +99,7 @@ static struct task_struct *idle_thread(int cpu)
99 current->thread.request.u.thread.proc = idle_proc; 99 current->thread.request.u.thread.proc = idle_proc;
100 current->thread.request.u.thread.arg = (void *) cpu; 100 current->thread.request.u.thread.arg = (void *) cpu;
101 new_task = fork_idle(cpu); 101 new_task = fork_idle(cpu);
102 if(IS_ERR(new_task)) 102 if (IS_ERR(new_task))
103 panic("copy_process failed in idle_thread, error = %ld", 103 panic("copy_process failed in idle_thread, error = %ld",
104 PTR_ERR(new_task)); 104 PTR_ERR(new_task));
105 105
@@ -126,14 +126,14 @@ void smp_prepare_cpus(unsigned int maxcpus)
126 cpu_set(me, cpu_callin_map); 126 cpu_set(me, cpu_callin_map);
127 127
128 err = os_pipe(cpu_data[me].ipi_pipe, 1, 1); 128 err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
129 if(err < 0) 129 if (err < 0)
130 panic("CPU#0 failed to create IPI pipe, errno = %d", -err); 130 panic("CPU#0 failed to create IPI pipe, errno = %d", -err);
131 131
132 os_set_fd_async(cpu_data[me].ipi_pipe[0], 132 os_set_fd_async(cpu_data[me].ipi_pipe[0],
133 current->thread.mode.tt.extern_pid); 133 current->thread.mode.tt.extern_pid);
134 134
135 for(cpu = 1; cpu < ncpus; cpu++){ 135 for (cpu = 1; cpu < ncpus; cpu++) {
136 printk("Booting processor %d...\n", cpu); 136 printk(KERN_INFO "Booting processor %d...\n", cpu);
137 137
138 idle = idle_thread(cpu); 138 idle = idle_thread(cpu);
139 139
@@ -144,8 +144,8 @@ void smp_prepare_cpus(unsigned int maxcpus)
144 cpu_relax(); 144 cpu_relax();
145 145
146 if (cpu_isset(cpu, cpu_callin_map)) 146 if (cpu_isset(cpu, cpu_callin_map))
147 printk("done\n"); 147 printk(KERN_INFO "done\n");
148 else printk("failed\n"); 148 else printk(KERN_INFO "failed\n");
149 } 149 }
150} 150}
151 151
@@ -187,13 +187,14 @@ void IPI_handler(int cpu)
187 break; 187 break;
188 188
189 case 'S': 189 case 'S':
190 printk("CPU#%d stopping\n", cpu); 190 printk(KERN_INFO "CPU#%d stopping\n", cpu);
191 while(1) 191 while (1)
192 pause(); 192 pause();
193 break; 193 break;
194 194
195 default: 195 default:
196 printk("CPU#%d received unknown IPI [%c]!\n", cpu, c); 196 printk(KERN_ERR "CPU#%d received unknown IPI [%c]!\n",
197 cpu, c);
197 break; 198 break;
198 } 199 }
199 } 200 }