From patchwork Wed May 20 05:02:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ramirez Luna, Omar" X-Patchwork-Id: 24826 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4K4waZa028755 for ; Wed, 20 May 2009 04:58:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751544AbZETE6c (ORCPT ); Wed, 20 May 2009 00:58:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751756AbZETE6c (ORCPT ); Wed, 20 May 2009 00:58:32 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:39054 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbZETE6c (ORCPT ); Wed, 20 May 2009 00:58:32 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n4K4wP42002191; Tue, 19 May 2009 23:58:30 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n4K4wO3Z001116; Tue, 19 May 2009 23:58:24 -0500 (CDT) Received: from Matrix (matrix.am.dhcp.ti.com [128.247.75.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n4K4wO922400; Tue, 19 May 2009 23:58:24 -0500 (CDT) Received: by Matrix (Postfix, from userid 1003) id 2DC394103E7; Wed, 20 May 2009 00:02:21 -0500 (CDT) From: Omar Ramirez Luna To: linux-omap Cc: Hiroshi.DOYU@nokia.com, ameya.palande@nokia.com, Omar Ramirez Luna Subject: [PATCH 03/14] DSPBRIDGE: Fixed Double notification when a sys_error happens Date: Wed, 20 May 2009 00:02:09 -0500 Message-Id: <1242795740-21535-3-git-send-email-x00omar@ti.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1242795740-21535-2-git-send-email-x00omar@ti.com> References: <1242795740-21535-1-git-send-email-x00omar@ti.com> <1242795740-21535-2-git-send-email-x00omar@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org There is no need to keep sending notifications once an mmu fault or sys error was sent, one notification should be enough to signal the reload of baseimage for recovery. Signed-off-by: Omar Ramirez Luna Acked-by: Hari Kanigeri --- drivers/dsp/bridge/wmd/ue_deh.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/dsp/bridge/wmd/ue_deh.c b/drivers/dsp/bridge/wmd/ue_deh.c index d5551cb..278dae2 100644 --- a/drivers/dsp/bridge/wmd/ue_deh.c +++ b/drivers/dsp/bridge/wmd/ue_deh.c @@ -197,6 +197,7 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask, struct DEH_MGR *pDehMgr = (struct DEH_MGR *)hDehMgr; struct WMD_DEV_CONTEXT *pDevContext; DSP_STATUS status = DSP_SOK; + DSP_STATUS status1 = DSP_EFAIL; u32 memPhysical = 0; u32 HW_MMU_MAX_TLB_COUNT = 31; u32 extern faultAddr; @@ -285,6 +286,11 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask, "0x%x\n", dwErrInfo); break; } + + /* Filter subsequent notifications when an error occurs */ + if (pDevContext->dwBrdState != BRD_ERROR) + status1 = DSP_SOK; + /* Set the Board state as ERROR */ pDevContext->dwBrdState = BRD_ERROR; /* Disable all the clocks that were enabled by DSP */ @@ -292,8 +298,11 @@ void WMD_DEH_Notify(struct DEH_MGR *hDehMgr, u32 ulEventMask, /* Call DSP Trace Buffer */ PrintDspTraceBuffer(hDehMgr->hWmdContext); - /* Signal DSP error/exception event. */ - NTFY_Notify(pDehMgr->hNtfy, ulEventMask); + if (DSP_SUCCEEDED(status1)) { + /* Signal DSP error/exception event. */ + NTFY_Notify(pDehMgr->hNtfy, ulEventMask); + } + } DBG_Trace(DBG_LEVEL1, "Exiting WMD_DEH_Notify\n");