Re: [PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
On Tue, Mar 31, 2015 at 09:52:24AM +0530, Lokesh Vutla wrote: > omap_sham_handle_queue() can be called as part of done_task tasklet. > During this its atomic and any calls to pm functions cannot sleep. > > But there is a call to pm_runtime_get_sync() (which can sleep) in > omap_sham_handle_queue(), because of which the following appears: > " [ 116.169969] BUG: scheduling while atomic: kworker/0:2/2676/0x0100" > > Add pm_runtime_irq_safe() to avoid this. > > Signed-off-by: Lokesh Vutla Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
On Tue, Mar 31, 2015 at 09:52:24AM +0530, Lokesh Vutla wrote: omap_sham_handle_queue() can be called as part of done_task tasklet. During this its atomic and any calls to pm functions cannot sleep. But there is a call to pm_runtime_get_sync() (which can sleep) in omap_sham_handle_queue(), because of which the following appears: [ 116.169969] BUG: scheduling while atomic: kworker/0:2/2676/0x0100 Add pm_runtime_irq_safe() to avoid this. Signed-off-by: Lokesh Vutla lokeshvu...@ti.com Applied. -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
omap_sham_handle_queue() can be called as part of done_task tasklet. During this its atomic and any calls to pm functions cannot sleep. But there is a call to pm_runtime_get_sync() (which can sleep) in omap_sham_handle_queue(), because of which the following appears: " [ 116.169969] BUG: scheduling while atomic: kworker/0:2/2676/0x0100" Add pm_runtime_irq_safe() to avoid this. Signed-off-by: Lokesh Vutla --- drivers/crypto/omap-sham.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ace5852..81ed511 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1949,6 +1949,7 @@ static int omap_sham_probe(struct platform_device *pdev) dd->flags |= dd->pdata->flags; pm_runtime_enable(dev); + pm_runtime_irq_safe(dev); pm_runtime_get_sync(dev); rev = omap_sham_read(dd, SHA_REG_REV(dd)); pm_runtime_put_sync(>dev); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
omap_sham_handle_queue() can be called as part of done_task tasklet. During this its atomic and any calls to pm functions cannot sleep. But there is a call to pm_runtime_get_sync() (which can sleep) in omap_sham_handle_queue(), because of which the following appears: [ 116.169969] BUG: scheduling while atomic: kworker/0:2/2676/0x0100 Add pm_runtime_irq_safe() to avoid this. Signed-off-by: Lokesh Vutla lokeshvu...@ti.com --- drivers/crypto/omap-sham.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ace5852..81ed511 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1949,6 +1949,7 @@ static int omap_sham_probe(struct platform_device *pdev) dd-flags |= dd-pdata-flags; pm_runtime_enable(dev); + pm_runtime_irq_safe(dev); pm_runtime_get_sync(dev); rev = omap_sham_read(dd, SHA_REG_REV(dd)); pm_runtime_put_sync(pdev-dev); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/