]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam: Replace in_irq() usage.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sun, 1 Nov 2020 23:22:57 +0000 (00:22 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 Nov 2020 01:41:38 +0000 (17:41 -0800)
commitb9b880ed491adade263767b7e89f57defe2fab1a
tree5e08842c10b20e763c4e794d4359e5aabdb920c2
parent2e57e99e7a238778192dfd618a476c03a95bcfae
crypto: caam: Replace in_irq() usage.

The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI
scheduling is required or packet processing.

The usage of in_*() in drivers is phased out and Linus clearly requested
that code which changes behaviour depending on context should either be
separated or the context be conveyed in an argument passed by the caller,
which usually knows the context.

Use the `sched_napi' argument passed by the callback. It is set true if
called from the interrupt handler and NAPI should be scheduled.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Li Yang <leoyang.li@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Tested-by: Camelia Groza <camelia.groza@nxp.com>
drivers/crypto/caam/qi.c