summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVeerabhadrarao Badiganti <vbadigan@codeaurora.org>2017-10-09 22:49:49 +0530
committerVeerabhadrarao Badiganti <vbadigan@codeaurora.org>2018-04-16 20:28:51 +0530
commitd3643ee7ff29a469859977d70a13ca641e52c323 (patch)
tree032357da337c9fd4b7d759e3537a7eb20fe86cf0 /include
parent1920040bec3e84b49b2f7a8435f9c5227ee8c9e3 (diff)
mmc: card: Service RPMB requests with priority over other requests
RPMB requests are initiated from TZ and TZ gets blocked from servicing other tasks/requests till it completes RPMB request. Delays in servicing RPMB request may result in system-level stability/performance issues. Below is the issue observed: 1. TZ rpmb API is called to update TA rollback information. TZ forwards the request to HLOS mmc driver via rpmb-service. 2. mmc driver services the rpmb requests only after finishing the outstanding IO requests. 3. As part of handling an IO requests, mmc driver makes ICE call for getting encryption keys, which in-turn makes call to TZ. 4. Since ICE driver finds TZ is busy/blocked it returns ice request with -EBUSY error. 5. The failed requests with -EBUSY error would re-queued back. 6. The IO requests keep getting failed and keep getting re-queued and mmc driver never gets a chance to service rpmb requests. 7. This results in a deadlock senario. So RPMB requests need to be serviced immediately. If there is any outstanding RPMB request, then mmc driver should stop pulling any more new requests. The moment its done with serving ongoing requests, It should start processing RPMB request. Change-Id: I2d0f98a11716ef946551cc1a967e70a38e91d6ac Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/host.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 34da10bff4e1..c9e252bc4c2c 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -600,6 +600,8 @@ struct mmc_host {
#endif
bool sdr104_wa;
+ atomic_t rpmb_req_pending;
+ struct mutex rpmb_req_mutex;
unsigned long private[0] ____cacheline_aligned;
};