diff options
Diffstat (limited to 'arch/blackfin/mach-common/smp.c')
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 61840059dfac..349ee3f5466a 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -211,6 +211,8 @@ int smp_call_function(void (*func)(void *info), void *info, int wait) | |||
211 | return 0; | 211 | return 0; |
212 | 212 | ||
213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 213 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
214 | if (!msg) | ||
215 | return -ENOMEM; | ||
214 | INIT_LIST_HEAD(&msg->list); | 216 | INIT_LIST_HEAD(&msg->list); |
215 | msg->call_struct.func = func; | 217 | msg->call_struct.func = func; |
216 | msg->call_struct.info = info; | 218 | msg->call_struct.info = info; |
@@ -252,6 +254,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | |||
252 | cpu_set(cpu, callmap); | 254 | cpu_set(cpu, callmap); |
253 | 255 | ||
254 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 256 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
257 | if (!msg) | ||
258 | return -ENOMEM; | ||
255 | INIT_LIST_HEAD(&msg->list); | 259 | INIT_LIST_HEAD(&msg->list); |
256 | msg->call_struct.func = func; | 260 | msg->call_struct.func = func; |
257 | msg->call_struct.info = info; | 261 | msg->call_struct.info = info; |
@@ -287,6 +291,8 @@ void smp_send_reschedule(int cpu) | |||
287 | return; | 291 | return; |
288 | 292 | ||
289 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 293 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
294 | if (!msg) | ||
295 | return; | ||
290 | memset(msg, 0, sizeof(msg)); | 296 | memset(msg, 0, sizeof(msg)); |
291 | INIT_LIST_HEAD(&msg->list); | 297 | INIT_LIST_HEAD(&msg->list); |
292 | msg->type = BFIN_IPI_RESCHEDULE; | 298 | msg->type = BFIN_IPI_RESCHEDULE; |
@@ -314,6 +320,8 @@ void smp_send_stop(void) | |||
314 | return; | 320 | return; |
315 | 321 | ||
316 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); | 322 | msg = kmalloc(sizeof(*msg), GFP_ATOMIC); |
323 | if (!msg) | ||
324 | return; | ||
317 | memset(msg, 0, sizeof(msg)); | 325 | memset(msg, 0, sizeof(msg)); |
318 | INIT_LIST_HEAD(&msg->list); | 326 | INIT_LIST_HEAD(&msg->list); |
319 | msg->type = BFIN_IPI_CPU_STOP; | 327 | msg->type = BFIN_IPI_CPU_STOP; |
@@ -450,7 +458,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
450 | unsigned int cpu; | 458 | unsigned int cpu; |
451 | 459 | ||
452 | for_each_online_cpu(cpu) | 460 | for_each_online_cpu(cpu) |
453 | bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy; | 461 | bogosum += loops_per_jiffy; |
454 | 462 | ||
455 | printk(KERN_INFO "SMP: Total of %d processors activated " | 463 | printk(KERN_INFO "SMP: Total of %d processors activated " |
456 | "(%lu.%02lu BogoMIPS).\n", | 464 | "(%lu.%02lu BogoMIPS).\n", |