mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
crypto: inside-secure - only dequeue when needed
This force the need_dequeue flag to be unset whenever the dequeue function is called, to avoid calling it when it is not necessary. Signed-off-by: Antoine Tenart <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
b1deb47ad1
commit
5eb0cc66f3
1 changed files with 3 additions and 3 deletions
|
|
@ -429,6 +429,8 @@ void safexcel_dequeue(struct safexcel_crypto_priv *priv, int ring)
|
|||
struct safexcel_request *request;
|
||||
int ret, nreq = 0, cdesc = 0, rdesc = 0, commands, results;
|
||||
|
||||
priv->ring[ring].need_dequeue = false;
|
||||
|
||||
do {
|
||||
spin_lock_bh(&priv->ring[ring].queue_lock);
|
||||
backlog = crypto_get_backlog(&priv->ring[ring].queue);
|
||||
|
|
@ -631,10 +633,8 @@ static void safexcel_handle_result_work(struct work_struct *work)
|
|||
|
||||
safexcel_handle_result_descriptor(priv, data->ring);
|
||||
|
||||
if (priv->ring[data->ring].need_dequeue) {
|
||||
priv->ring[data->ring].need_dequeue = false;
|
||||
if (priv->ring[data->ring].need_dequeue)
|
||||
safexcel_dequeue(data->priv, data->ring);
|
||||
}
|
||||
}
|
||||
|
||||
struct safexcel_ring_irq_data {
|
||||
|
|
|
|||
Loading…
Reference in a new issue