]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam/qi - simplify CGR allocation, freeing
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 8 Oct 2018 11:09:37 +0000 (14:09 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 17 Oct 2018 06:14:46 +0000 (14:14 +0800)
commit0d551e1d994f081e37d191ea78432e0a6a9af002
treed66f2708bd317cae2087a29645d5606e10f571f6
parentf1bf034661a6a8cf109060489293bf916d27dd75
crypto: caam/qi - simplify CGR allocation, freeing

CGRs (Congestion Groups) have to be freed by the same CPU that
initialized them.
This is why currently the driver takes special measures; however, using
set_cpus_allowed_ptr() is incorrect - as reported by Sebastian.

Instead of the generic solution of replacing set_cpus_allowed_ptr() with
work_on_cpu_safe(), we use the qman_delete_cgr_safe() QBMan API instead
of qman_delete_cgr() - which internally takes care of proper CGR
deletion.

Link: https://lkml.kernel.org/r/20181005125443.dfhd2asqktm22ney@linutronix.de
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/qi.c
drivers/crypto/caam/qi.h