diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2016-11-29 12:09:10 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-12-05 10:31:03 +0100 |
commit | e0097cf5f2f1b7b8a594beaa32a604776d3ca6ce (patch) | |
tree | c8bf2968781103c73931e6d3ad2791e529a948d1 /include/linux/mmc | |
parent | 5be80375f5a030e5f5beba76620380da5ea6cefa (diff) | |
download | linux-stable-e0097cf5f2f1b7b8a594beaa32a604776d3ca6ce.tar.gz linux-stable-e0097cf5f2f1b7b8a594beaa32a604776d3ca6ce.tar.bz2 linux-stable-e0097cf5f2f1b7b8a594beaa32a604776d3ca6ce.zip |
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>
Diffstat (limited to 'include/linux/mmc')
-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 2ce32fefb41c..8bc884121465 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; |