All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: <herbert@gondor.apana.org.au>, <linux-crypto@vger.kernel.org>
Cc: <linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<nsekhar@ti.com>, <t-kristo@ti.com>, <lokeshvutla@ti.com>
Subject: [PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
Date: Tue, 31 Mar 2015 09:52:24 +0530	[thread overview]
Message-ID: <1427775745-4674-2-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1427775745-4674-1-git-send-email-lokeshvutla@ti.com>

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/0x00000100"

Add pm_runtime_irq_safe() to avoid this.

Signed-off-by: Lokesh Vutla <lokeshvutla@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

WARNING: multiple messages have this Message-ID (diff)
From: Lokesh Vutla <lokeshvutla@ti.com>
To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	nsekhar@ti.com, t-kristo@ti.com, lokeshvutla@ti.com
Subject: [PATCH] crypto: omap-sham: Use pm_runtime_irq_safe()
Date: Tue, 31 Mar 2015 09:52:24 +0530	[thread overview]
Message-ID: <1427775745-4674-2-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1427775745-4674-1-git-send-email-lokeshvutla@ti.com>

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/0x00000100"

Add pm_runtime_irq_safe() to avoid this.

Signed-off-by: Lokesh Vutla <lokeshvutla@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

  reply	other threads:[~2015-03-31  4:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  4:22 [PATCH] crypto: omap-sham: Check for HIGHMEM before mapping SG pages Lokesh Vutla
2015-03-31  4:22 ` Lokesh Vutla
2015-03-31  4:22 ` Lokesh Vutla [this message]
2015-03-31  4:22   ` [PATCH] crypto: omap-sham: Use pm_runtime_irq_safe() Lokesh Vutla
2015-04-01 14:24   ` Herbert Xu
2015-03-31  4:22 ` [PATCH] crypto: omap-aes: Fix support for unequal lengths Lokesh Vutla
2015-03-31  4:22   ` Lokesh Vutla
2015-04-01 14:24   ` Herbert Xu
2015-04-01 14:18 ` [PATCH] crypto: omap-sham: Check for HIGHMEM before mapping SG pages Herbert Xu
2015-04-02 10:00   ` Lokesh Vutla
2015-04-02 10:00     ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427775745-4674-2-git-send-email-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=t-kristo@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.