All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>,
	linux-omap@vger.kernel.org, "Fernandes, Joel" <joelf@ti.com>
Subject: Re: L3 custom error on OMAP4460 (AES/DES)
Date: Tue, 15 Apr 2014 09:01:37 -0500	[thread overview]
Message-ID: <20140415140137.GA11840@kahuna> (raw)
In-Reply-To: <CAGhQ9Vz0Yj8Qz1x9tLH9=jkNEvmsrKBH2=QbYBUYUgoqxGuHAQ@mail.gmail.com>

On 22:36-20140414, Joachim Eastwood wrote:
> On 14 April 2014 21:19, Nishanth Menon <nm@ti.com> wrote:
> > On 04/14/2014 02:15 PM, Joachim Eastwood wrote:
> >> On 14 April 2014 15:38, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
> >>> On Saturday 12 April 2014 05:06 PM, Joachim Eastwood wrote:
> >>>> Hi,
> >>>>
> >>>> I getting the following error on Linus master right now.
> >>>>
> >>>> [ 2.166320] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:113
> >>>> l3_interrupt_handler+0xf4/0x154()
> >>>> [ 2.166320] L3 custom error: MASTER:MPU TARGET:L4 PER2
> >>>> [ 2.166320] Modules linked in:
> >
> > [...]
> >>>> The hardware is a VAR-STK-OM44 dev kit. I got one patch on top of
> >>>> Linus master which is the DT support patch which I posted a couple of
> >>>> hours ago.
> >>>>
> >>> Have you tried removing AES from the build ? Probably worth a
> >>> try.
> >>
> >> Removing the aes driver makes the warning from omap_l3_noc disappear.
> >>
> >> I also tried tried the omap_l3_noc patches from Nishanth Menon that
> >> was just posted but it had the same error when the aes driver was
> >> built-in.
> > Yeah - it better :).. Good to know that driver continues to report bad
> > accesses by drivers to targets that are not active yet. will be great
> > if you could provide a "Tested-by" tag on my series :).
> 
> Sure. The patch set booted fine on my VAR-STK-OM44 (OMAP4460).
> Tested-by: Joachim Eastwood <manabian@gmail.com>
> 
> > Btw, I just finished testing on PandaBoard ES and SDP4430 and I dont
> > see the error that you see on var som. I wonder why?
> >
> > pandaboard-es:  Boot PASS: http://slexy.org/raw/s21Hsq97mt
> > sdp4430:  Boot PASS: http://slexy.org/raw/s2ZQJUqjrP
> 
> hmm. Maybe it's a combination of different config options.
> 
> I have attached the complete dmesg and config from my board. Maybe you
> could try the config out.
> 
> I noticed from your PandaBoard ES log that you only get this line:
> [ 0.555480] platform 4b501000.aes: Cannot lookup hwmod 'aes'
> 
> While on my board I first get the "Cannot lookup" message and then
> some other messages:
> [ 0.512847] platform 4b501000.aes: Cannot lookup hwmod 'aes'
> [ 2.341125] omap-aes 4b501000.aes: _od_fail_runtime_resume: FIXME:
> missing hwmod/omap_dev info
> [ 2.350219] omap-aes 4b501000.aes: omap_aes_probe: failed to get_sync(-19)
> [ 2.357482] omap-aes 4b501000.aes: initialization failed.

Yep, I was able to reproduce the error:
pandaboard-es-before: http://slexy.org/raw/s21rGPFnKl
pandaboard-es-after:  http://slexy.org/raw/s2A4UFQVna

Key was "omap-des 480a5000.des: OMAP DES hw accel rev: 0.0" in the log.

Please try the following patch:
--8<--
>From a5c1b5645eef74c88ea22f6ec99054ec0e9a2502 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Tue, 15 Apr 2014 08:55:44 -0500
Subject: [PATCH] crypto: omap-des - handle error of pm_runtime_get_sync

pm_runtime_get_sync may not always succeed depending on SoC involved. So
handle the error appropriately.

Signed-off-by: Nishanth Menon <nm@ti.com>
---

based on v3.15-rc1

 drivers/crypto/omap-des.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c
index ec5f131..c2d362f 100644
--- a/drivers/crypto/omap-des.c
+++ b/drivers/crypto/omap-des.c
@@ -223,12 +223,18 @@ static void omap_des_write_n(struct omap_des_dev *dd, u32 offset,
 
 static int omap_des_hw_init(struct omap_des_dev *dd)
 {
+	int err;
+
 	/*
 	 * clocks are enabled when request starts and disabled when finished.
 	 * It may be long delays between requests.
 	 * Device might go to off mode to save power.
 	 */
-	pm_runtime_get_sync(dd->dev);
+	err = pm_runtime_get_sync(dd->dev);
+	if (err < 0) {
+		dev_err(dd->dev, "failed to get_sync(%d)\n", err);
+		return err;
+	}
 
 	if (!(dd->flags & FLAGS_INIT)) {
 		dd->flags |= FLAGS_INIT;
@@ -1083,7 +1089,11 @@ static int omap_des_probe(struct platform_device *pdev)
 	dd->phys_base = res->start;
 
 	pm_runtime_enable(dev);
-	pm_runtime_get_sync(dev);
+	err = pm_runtime_get_sync(dev);
+	if (err < 0) {
+		dev_err(dd->dev, "failed to get_sync(%d)\n", err);
+		goto err_get;
+	}
 
 	omap_des_dma_stop(dd);
 
@@ -1148,6 +1158,7 @@ err_algs:
 err_irq:
 	tasklet_kill(&dd->done_task);
 	tasklet_kill(&dd->queue_task);
+err_get:
 	pm_runtime_disable(dev);
 err_res:
 	dd = NULL;
@@ -1191,8 +1202,7 @@ static int omap_des_suspend(struct device *dev)
 
 static int omap_des_resume(struct device *dev)
 {
-	pm_runtime_get_sync(dev);
-	return 0;
+	return pm_runtime_get_sync(dev);
 }
 #endif
 
-- 
1.7.9.5



-- 
Regards,
Nishanth Menon

  parent reply	other threads:[~2014-04-15 14:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-12 21:06 L3 custom error on OMAP4460 Joachim Eastwood
2014-04-14 13:38 ` Santosh Shilimkar
2014-04-14 19:15   ` Joachim Eastwood
2014-04-14 19:19     ` L3 custom error on OMAP4460 (AES/DES) Nishanth Menon
     [not found]       ` <CAGhQ9Vz0Yj8Qz1x9tLH9=jkNEvmsrKBH2=QbYBUYUgoqxGuHAQ@mail.gmail.com>
2014-04-15 14:01         ` Nishanth Menon [this message]
2014-04-15 15:55           ` Joachim Eastwood
2014-04-15 17:15       ` Joel Fernandes
2014-04-15 17:19         ` Nishanth Menon

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=20140415140137.GA11840@kahuna \
    --to=nm@ti.com \
    --cc=joelf@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=santosh.shilimkar@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.