crypto: sahara - replace tasklets with kthread
commitc0c3c89ae34764890c2294dc4ddf055940b64c36
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>
Mon, 1 Dec 2014 12:26:33 +0000 (1 13:26 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 3 Dec 2014 14:30:19 +0000 (3 22:30 +0800)
tree346106151643d17b071ac8792b53fe9cdda2fd06
parent5ed903b3f567616deddf6bfa513ee7b1fcef64d2
crypto: sahara - replace tasklets with kthread

In preparation for SHA support, replace the tasklets with a kthread that
manages one crypto_queue for the core.

As the Sahara can only process one AES or SHA request at a time, we make
sure that the queue serializes all requests from userspace. Instead of a
watchdog timer we now use a completion mechanism in the queue manager
thread.
This makes the control flow more obvious and guarantees, that only one
request is dequeued until the completion is completed.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sahara.c