diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2016-11-29 12:09:10 +0200 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 95337927f82bdedb9633c2d36e924eaf89fbc6b6 (patch) | |
tree | 84924b685912249dea6414a78d49c917d76b8d1f /include/linux/mmc/host.h | |
parent | eb0d14830022b47c25d3bc4cc191acca503139e1 (diff) |
mmc: queue: Fix queue thread wake-up
The only time the driver sleeps expecting to be woken upon the arrival of
a new request, is when the dispatch queue is empty. The only time that it
is known whether the dispatch queue is empty is after NULL is returned
from blk_fetch_request() while under the queue lock.
Recognizing those facts, simplify the synchronization between the queue
thread and the request function. A couple of flags tell the request
function what to do, and the queue lock and barriers associated with
wake-ups ensure synchronization.
The result is simpler and allows the removal of the context_info lock.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit e0097cf5f2f1b7b8a594beaa32a604776d3ca6ce)
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index aec20409b868..1491700494cb 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -197,14 +197,12 @@ struct mmc_slot { * @is_new_req wake up reason was new request * @is_waiting_last_req mmc context waiting for single running request * @wait wait queue - * @lock lock to protect data fields */ struct mmc_context_info { bool is_done_rcv; bool is_new_req; bool is_waiting_last_req; wait_queue_head_t wait; - spinlock_t lock; }; struct regulator; |