aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/up.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-02-24 10:39:57 -0500
committerJens Axboe <axboe@fb.com>2014-02-24 17:46:55 -0500
commit08eed44c7249d381a099bc55577e55c6bb533160 (patch)
treef4d2467cd82c40e10ec0e360398891632edf6a48 /kernel/up.c
parent0ebeb79ce920bed3a4a55113534951d95a444fbb (diff)
smp: Teach __smp_call_function_single() to check for offline cpus
Align __smp_call_function_single() with smp_call_function_single() so that it also checks whether requested cpu is still online. Signed-off-by: Jan Kara <jack@suse.cz> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jens Axboe <axboe@fb.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'kernel/up.c')
-rw-r--r--kernel/up.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/up.c b/kernel/up.c
index 509403e3fbc6..cdf03d16840e 100644
--- a/kernel/up.c
+++ b/kernel/up.c
@@ -22,14 +22,15 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
22} 22}
23EXPORT_SYMBOL(smp_call_function_single); 23EXPORT_SYMBOL(smp_call_function_single);
24 24
25void __smp_call_function_single(int cpu, struct call_single_data *csd, 25int __smp_call_function_single(int cpu, struct call_single_data *csd,
26 int wait) 26 int wait)
27{ 27{
28 unsigned long flags; 28 unsigned long flags;
29 29
30 local_irq_save(flags); 30 local_irq_save(flags);
31 csd->func(csd->info); 31 csd->func(csd->info);
32 local_irq_restore(flags); 32 local_irq_restore(flags);
33 return 0;
33} 34}
34EXPORT_SYMBOL(__smp_call_function_single); 35EXPORT_SYMBOL(__smp_call_function_single);
35 36