* [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
@ 2013-02-26 16:04 agnel.joel
2013-02-26 16:04 ` [PATCH v3 2/2] omap-aes: " agnel.joel
2013-02-26 23:06 ` [PATCH v3 1/2] omap-sham: " Mark A. Greer
0 siblings, 2 replies; 5+ messages in thread
From: agnel.joel @ 2013-02-26 16:04 UTC (permalink / raw)
To: linux-crypto; +Cc: Joel A Fernandes, Herbert Xu, David S. Miller, Mark A. Greer
From: Joel A Fernandes <joelagnel@ti.com>
After DMA is complete, the omap_sham_finish_req function is called as
a part of the done_task tasklet. During this its atomic and any calls
to pm functions should not assume they wont sleep.
The patch replaces a call to pm_runtime_put_sync (which can sleep) with
pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during
SHA operation.
Tested on an AM33xx SoC device (beaglebone board).
To reproduce the problem, used the tcrypt kernel module as:
modprobe tcrypt sec=2 mode=403
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Mark A. Greer <mgreer@animalcreek.com>
---
drivers/crypto/omap-sham.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index edff981..b8bb583 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -923,7 +923,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
dd->flags &= ~(BIT(FLAGS_BUSY) | BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) |
BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
- pm_runtime_put_sync(dd->dev);
+ pm_runtime_put(dd->dev);
if (req->base.complete)
req->base.complete(&req->base, err);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] omap-aes: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
2013-02-26 16:04 [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet agnel.joel
@ 2013-02-26 16:04 ` agnel.joel
2013-02-26 23:06 ` Mark A. Greer
2013-02-26 23:06 ` [PATCH v3 1/2] omap-sham: " Mark A. Greer
1 sibling, 1 reply; 5+ messages in thread
From: agnel.joel @ 2013-02-26 16:04 UTC (permalink / raw)
To: linux-crypto; +Cc: Joel A Fernandes, Herbert Xu, David S. Miller, Mark A. Greer
From: Joel A Fernandes <joelagnel@ti.com>
After DMA is complete, the omap_aes_finish_req function is called as
a part of the done_task tasklet. During this its atomic and any calls
to pm functions should not assume they wont sleep.
The patch replaces a call to pm_runtime_put_sync (which can sleep) with
pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during
AES operation.
Tested on an AM33xx SoC device (beaglebone board).
To reproduce the problem, I used the tcrypt kernel module as:
modprobe tcrypt sec=2 mode=500
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Mark A. Greer <mgreer@animalcreek.com>
---
drivers/crypto/omap-aes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index cf57866..8450bfd2 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -636,7 +636,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
pr_debug("err: %d\n", err);
- pm_runtime_put_sync(dd->dev);
+ pm_runtime_put(dd->dev);
dd->flags &= ~FLAGS_BUSY;
req->base.complete(&req->base, err);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
2013-02-26 16:04 [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet agnel.joel
2013-02-26 16:04 ` [PATCH v3 2/2] omap-aes: " agnel.joel
@ 2013-02-26 23:06 ` Mark A. Greer
1 sibling, 0 replies; 5+ messages in thread
From: Mark A. Greer @ 2013-02-26 23:06 UTC (permalink / raw)
To: agnel.joel; +Cc: linux-crypto, Joel A Fernandes, Herbert Xu, David S. Miller
On Tue, Feb 26, 2013 at 10:04:31AM -0600, agnel.joel@gmail.com wrote:
> From: Joel A Fernandes <joelagnel@ti.com>
>
> After DMA is complete, the omap_sham_finish_req function is called as
> a part of the done_task tasklet. During this its atomic and any calls
> to pm functions should not assume they wont sleep.
>
> The patch replaces a call to pm_runtime_put_sync (which can sleep) with
> pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during
> SHA operation.
>
> Tested on an AM33xx SoC device (beaglebone board).
> To reproduce the problem, used the tcrypt kernel module as:
> modprobe tcrypt sec=2 mode=403
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Mark A. Greer <mgreer@animalcreek.com>
> ---
> drivers/crypto/omap-sham.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index edff981..b8bb583 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -923,7 +923,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
> dd->flags &= ~(BIT(FLAGS_BUSY) | BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) |
> BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
>
> - pm_runtime_put_sync(dd->dev);
> + pm_runtime_put(dd->dev);
>
> if (req->base.complete)
> req->base.complete(&req->base, err);
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] omap-aes: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
2013-02-26 16:04 ` [PATCH v3 2/2] omap-aes: " agnel.joel
@ 2013-02-26 23:06 ` Mark A. Greer
2013-03-10 10:15 ` Herbert Xu
0 siblings, 1 reply; 5+ messages in thread
From: Mark A. Greer @ 2013-02-26 23:06 UTC (permalink / raw)
To: agnel.joel; +Cc: linux-crypto, Joel A Fernandes, Herbert Xu, David S. Miller
On Tue, Feb 26, 2013 at 10:04:32AM -0600, agnel.joel@gmail.com wrote:
> From: Joel A Fernandes <joelagnel@ti.com>
>
> After DMA is complete, the omap_aes_finish_req function is called as
> a part of the done_task tasklet. During this its atomic and any calls
> to pm functions should not assume they wont sleep.
>
> The patch replaces a call to pm_runtime_put_sync (which can sleep) with
> pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during
> AES operation.
>
> Tested on an AM33xx SoC device (beaglebone board).
> To reproduce the problem, I used the tcrypt kernel module as:
> modprobe tcrypt sec=2 mode=500
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Mark A. Greer <mgreer@animalcreek.com>
> ---
> drivers/crypto/omap-aes.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
> index cf57866..8450bfd2 100644
> --- a/drivers/crypto/omap-aes.c
> +++ b/drivers/crypto/omap-aes.c
> @@ -636,7 +636,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
>
> pr_debug("err: %d\n", err);
>
> - pm_runtime_put_sync(dd->dev);
> + pm_runtime_put(dd->dev);
> dd->flags &= ~FLAGS_BUSY;
>
> req->base.complete(&req->base, err);
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] omap-aes: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet
2013-02-26 23:06 ` Mark A. Greer
@ 2013-03-10 10:15 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2013-03-10 10:15 UTC (permalink / raw)
To: Mark A. Greer; +Cc: agnel.joel, linux-crypto, Joel A Fernandes, David S. Miller
On Tue, Feb 26, 2013 at 04:06:36PM -0700, Mark A. Greer wrote:
> On Tue, Feb 26, 2013 at 10:04:32AM -0600, agnel.joel@gmail.com wrote:
> > From: Joel A Fernandes <joelagnel@ti.com>
> >
> > After DMA is complete, the omap_aes_finish_req function is called as
> > a part of the done_task tasklet. During this its atomic and any calls
> > to pm functions should not assume they wont sleep.
> >
> > The patch replaces a call to pm_runtime_put_sync (which can sleep) with
> > pm_runtime_put thus fixing a kernel panic observed on AM33xx SoC during
> > AES operation.
> >
> > Tested on an AM33xx SoC device (beaglebone board).
> > To reproduce the problem, I used the tcrypt kernel module as:
> > modprobe tcrypt sec=2 mode=500
> >
> > Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: David S. Miller <davem@davemloft.net>
> > Cc: Mark A. Greer <mgreer@animalcreek.com>
> > ---
> > drivers/crypto/omap-aes.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
> > index cf57866..8450bfd2 100644
> > --- a/drivers/crypto/omap-aes.c
> > +++ b/drivers/crypto/omap-aes.c
> > @@ -636,7 +636,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
> >
> > pr_debug("err: %d\n", err);
> >
> > - pm_runtime_put_sync(dd->dev);
> > + pm_runtime_put(dd->dev);
> > dd->flags &= ~FLAGS_BUSY;
> >
> > req->base.complete(&req->base, err);
>
> Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Both patches applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-10 10:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 16:04 [PATCH v3 1/2] omap-sham: Use pm_runtime_put instead of pm_runtime_put_sync in tasklet agnel.joel
2013-02-26 16:04 ` [PATCH v3 2/2] omap-aes: " agnel.joel
2013-02-26 23:06 ` Mark A. Greer
2013-03-10 10:15 ` Herbert Xu
2013-02-26 23:06 ` [PATCH v3 1/2] omap-sham: " Mark A. Greer
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.