diff options
| author | Jens Axboe <axboe@kernel.dk> | 2013-11-08 11:08:12 -0500 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2013-11-08 11:08:12 -0500 |
| commit | e37459b8e2c7db6735e39e019e448b76e5e77647 (patch) | |
| tree | a3f0944db87a8ae0d41e5acbbbabc1e7ef534d1b /kernel | |
| parent | c7d1ba417c7cb7297d14dd47a390ec90ce548d5c (diff) | |
| parent | e7e245000110a7794de8f925b9edc06a9c852f80 (diff) | |
Merge branch 'blk-mq/core' into for-3.13/core
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Conflicts:
block/blk-timeout.c
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/smp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 0564571dcdf7..dbc3d42d2c68 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS | 18 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS |
| 19 | enum { | 19 | enum { |
| 20 | CSD_FLAG_LOCK = 0x01, | 20 | CSD_FLAG_LOCK = 0x01, |
| 21 | CSD_FLAG_WAIT = 0x02, | ||
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| 23 | struct call_function_data { | 24 | struct call_function_data { |
| @@ -124,7 +125,7 @@ static void csd_lock(struct call_single_data *csd) | |||
| 124 | 125 | ||
| 125 | static void csd_unlock(struct call_single_data *csd) | 126 | static void csd_unlock(struct call_single_data *csd) |
| 126 | { | 127 | { |
| 127 | WARN_ON(!(csd->flags & CSD_FLAG_LOCK)); | 128 | WARN_ON((csd->flags & CSD_FLAG_WAIT) && !(csd->flags & CSD_FLAG_LOCK)); |
| 128 | 129 | ||
| 129 | /* | 130 | /* |
| 130 | * ensure we're all done before releasing data: | 131 | * ensure we're all done before releasing data: |
| @@ -146,6 +147,9 @@ void generic_exec_single(int cpu, struct call_single_data *csd, int wait) | |||
| 146 | unsigned long flags; | 147 | unsigned long flags; |
| 147 | int ipi; | 148 | int ipi; |
| 148 | 149 | ||
| 150 | if (wait) | ||
| 151 | csd->flags |= CSD_FLAG_WAIT; | ||
| 152 | |||
| 149 | raw_spin_lock_irqsave(&dst->lock, flags); | 153 | raw_spin_lock_irqsave(&dst->lock, flags); |
| 150 | ipi = list_empty(&dst->list); | 154 | ipi = list_empty(&dst->list); |
| 151 | list_add_tail(&csd->list, &dst->list); | 155 | list_add_tail(&csd->list, &dst->list); |
| @@ -340,6 +344,7 @@ void __smp_call_function_single(int cpu, struct call_single_data *csd, | |||
| 340 | } | 344 | } |
| 341 | put_cpu(); | 345 | put_cpu(); |
| 342 | } | 346 | } |
| 347 | EXPORT_SYMBOL_GPL(__smp_call_function_single); | ||
| 343 | 348 | ||
| 344 | /** | 349 | /** |
| 345 | * smp_call_function_many(): Run a function on a set of other CPUs. | 350 | * smp_call_function_many(): Run a function on a set of other CPUs. |
