From patchwork Tue Apr 15 14:01:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 3993211 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E5079F2CC for ; Tue, 15 Apr 2014 14:01:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B65D201D3 for ; Tue, 15 Apr 2014 14:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8F6102022A for ; Tue, 15 Apr 2014 14:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755107AbaDOOBl (ORCPT ); Tue, 15 Apr 2014 10:01:41 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44137 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755099AbaDOOBj (ORCPT ); Tue, 15 Apr 2014 10:01:39 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3FE1bUa024203; Tue, 15 Apr 2014 09:01:37 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3FE1bJE026521; Tue, 15 Apr 2014 09:01:37 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 15 Apr 2014 09:01:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3FE1bm7012126; Tue, 15 Apr 2014 09:01:37 -0500 Date: Tue, 15 Apr 2014 09:01:37 -0500 From: Nishanth Menon To: Joachim Eastwood CC: Santosh Shilimkar , , "Fernandes, Joel" Subject: Re: L3 custom error on OMAP4460 (AES/DES) Message-ID: <20140415140137.GA11840@kahuna> References: <534BE4D1.4080104@ti.com> <534C34BD.6060109@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 22:36-20140414, Joachim Eastwood wrote: > On 14 April 2014 21:19, Nishanth Menon wrote: > > On 04/14/2014 02:15 PM, Joachim Eastwood wrote: > >> On 14 April 2014 15:38, Santosh Shilimkar 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 > > > 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 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 Tested-by: Joachim Eastwood --- 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