From patchwork Sun May 16 15:46:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 99974 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4GFkVf0025290 for ; Sun, 16 May 2010 15:46:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753626Ab0EPPqa (ORCPT ); Sun, 16 May 2010 11:46:30 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:5081 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753444Ab0EPPq3 (ORCPT ); Sun, 16 May 2010 11:46:29 -0400 Received: by fg-out-1718.google.com with SMTP id d23so2359940fga.1 for ; Sun, 16 May 2010 08:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=+d5OTzejBAVXsk96eLvdw6cM8Jw6MDDUuTbknFkncyw=; b=AUCtAb6WEwH65sKmd0OfvvAYwba8keuPOJamcRzCeje1zAgYW2vZ0oqBkDbcfJdz3x cUYnu/yXm8CoMljwAY8GHYymYUljphmjIRGcByIq38qC7fLxsvVksjQrQ2rP7rQ1b23q qI860kFIrQT3fT9WmNf2oz0Sqw0xfUHN+3Z5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=ePAGF7s9n0E8i+ynyBu6xT3wvlJn17Qrt8CnlDG7EzPQcBiq36APO/HZ/CbGA2DAme eCqhPZ+OGctgtb7xni6joXDXx05gTBQwCYciHd9ogerf+uLN08pVBj7/OmbZUNyAKRSO I/Des4aTEZupxSnR0LWn+VGtbfk+MGa/IQfAM= Received: by 10.87.48.18 with SMTP id a18mr6726908fgk.53.1274024788736; Sun, 16 May 2010 08:46:28 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id 4sm11649460fgg.22.2010.05.16.08.46.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 16 May 2010 08:46:28 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: Omar Ramirez Luna , Fernando Guzman Lugo , Felipe Contreras Subject: [PATCH 10/14] dspbridge: deh: remove err_info Date: Sun, 16 May 2010 18:46:01 +0300 Message-Id: <1274024765-21076-11-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274024765-21076-1-git-send-email-felipe.contreras@gmail.com> References: <1274024765-21076-1-git-send-email-felipe.contreras@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 16 May 2010 15:46:31 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index c6703a2..3c337e4 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -431,7 +431,6 @@ struct dsp_errorinfo { struct dsp_processorstate { u32 cb_struct; enum dsp_procstate proc_state; - struct dsp_errorinfo err_info; }; /* diff --git a/drivers/dsp/bridge/core/_deh.h b/drivers/dsp/bridge/core/_deh.h index 8da2212..32b84f3 100644 --- a/drivers/dsp/bridge/core/_deh.h +++ b/drivers/dsp/bridge/core/_deh.h @@ -26,7 +26,7 @@ struct deh_mgr { struct bridge_dev_context *hbridge_context; /* Bridge context. */ struct ntfy_object *ntfy_obj; /* NTFY object */ - struct dsp_errorinfo err_info; /* DSP exception info. */ + u32 fault_addr; /* MMU Fault DPC */ struct tasklet_struct dpc_tasklet; diff --git a/drivers/dsp/bridge/core/mmu_fault.c b/drivers/dsp/bridge/core/mmu_fault.c index 1de9cb4..49034cf 100644 --- a/drivers/dsp/bridge/core/mmu_fault.c +++ b/drivers/dsp/bridge/core/mmu_fault.c @@ -42,8 +42,6 @@ #include "_tiomap.h" #include "mmu_fault.h" -u32 fault_addr; - /* * ======== mmu_fault_dpc ======== * Deferred procedure call to handle DSP MMU fault. @@ -80,9 +78,9 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData) hw_mmu_event_status(resources->dw_dmmu_base, &dmmu_event_mask); if (dmmu_event_mask == HW_MMU_TRANSLATION_FAULT) { - hw_mmu_fault_addr_read(resources->dw_dmmu_base, &fault_addr); + hw_mmu_fault_addr_read(resources->dw_dmmu_base, &deh_mgr_obj->fault_addr); dev_info(bridge, "%s: status=0x%x, fault_addr=0x%x\n", __func__, - dmmu_event_mask, fault_addr); + dmmu_event_mask, deh_mgr_obj->fault_addr); /* * Schedule a DPC directly. In the future, it may be * necessary to check if DSP MMU fault is intended for @@ -90,11 +88,6 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData) */ tasklet_schedule(&deh_mgr_obj->dpc_tasklet); - /* Reset err_info structure before use. */ - deh_mgr_obj->err_info.dw_err_mask = DSP_MMUFAULT; - deh_mgr_obj->err_info.dw_val1 = fault_addr >> 16; - deh_mgr_obj->err_info.dw_val2 = fault_addr & 0xFFFF; - deh_mgr_obj->err_info.dw_val3 = 0L; /* Disable the MMU events, else once we clear it will * start to raise INTs again */ hw_mmu_event_disable(resources->dw_dmmu_base, diff --git a/drivers/dsp/bridge/core/mmu_fault.h b/drivers/dsp/bridge/core/mmu_fault.h index 74db489..537e6e7 100644 --- a/drivers/dsp/bridge/core/mmu_fault.h +++ b/drivers/dsp/bridge/core/mmu_fault.h @@ -19,8 +19,6 @@ #ifndef MMU_FAULT_ #define MMU_FAULT_ -extern u32 fault_addr; - /* * ======== mmu_fault_dpc ======== * Deferred procedure call to handle DSP MMU fault. diff --git a/drivers/dsp/bridge/core/ue_deh.c b/drivers/dsp/bridge/core/ue_deh.c index 2388780..6035757 100644 --- a/drivers/dsp/bridge/core/ue_deh.c +++ b/drivers/dsp/bridge/core/ue_deh.c @@ -94,10 +94,6 @@ dsp_status bridge_deh_create(struct deh_mgr **ret_deh_mgr, /* Fill in context structure */ deh_mgr->hbridge_context = hbridge_context; - deh_mgr->err_info.dw_err_mask = 0L; - deh_mgr->err_info.dw_val1 = 0L; - deh_mgr->err_info.dw_val2 = 0L; - deh_mgr->err_info.dw_val3 = 0L; /* Install ISR function for DSP MMU fault */ status = request_irq(INT_DSP_MMU_IRQ, mmu_fault_isr, 0, @@ -189,7 +185,8 @@ static void wait_for_timer(void) omap_dm_timer_disable(timer); } -static void mmu_fault_print_stack(struct bridge_dev_context *dev_context) +static void mmu_fault_print_stack(struct bridge_dev_context *dev_context, + u32 fault_addr) { struct cfg_hostres *resources; struct hw_mmu_map_attrs_t map_attrs = { @@ -237,49 +234,28 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo) switch (ulEventMask) { case DSP_SYSERROR: - /* reset err_info structure before use */ - deh_mgr->err_info.dw_err_mask = DSP_SYSERROR; - deh_mgr->err_info.dw_val1 = 0L; - deh_mgr->err_info.dw_val2 = 0L; - deh_mgr->err_info.dw_val3 = 0L; - deh_mgr->err_info.dw_val1 = dwErrInfo; dev_err(bridge, "%s: %s, err_info = 0x%x\n", __func__, "DSP_SYSERROR", dwErrInfo); dump_dl_modules(dev_context); dump_dsp_stack(dev_context); break; case DSP_MMUFAULT: - /* MMU fault routine should have set err info structure. */ - deh_mgr->err_info.dw_err_mask = DSP_MMUFAULT; dev_err(bridge, "%s: %s, err_info = 0x%x\n", __func__, "DSP_MMUFAULT", dwErrInfo); - dev_info(bridge, "%s: %s, high=0x%x, low=0x%x, " - "fault=0x%x\n", __func__, "DSP_MMUFAULT", - (unsigned int) deh_mgr->err_info.dw_val1, - (unsigned int) deh_mgr->err_info.dw_val2, - (unsigned int) fault_addr); + dev_info(bridge, "%s: %s, fault=0x%x\n", __func__, "DSP_MMUFAULT", + deh_mgr->fault_addr); print_dsp_trace_buffer(dev_context); dump_dl_modules(dev_context); - mmu_fault_print_stack(dev_context); + mmu_fault_print_stack(dev_context, deh_mgr->fault_addr); break; #ifdef CONFIG_BRIDGE_NTFY_PWRERR case DSP_PWRERROR: - /* reset err_info structure before use */ - deh_mgr->err_info.dw_err_mask = DSP_PWRERROR; - deh_mgr->err_info.dw_val1 = 0L; - deh_mgr->err_info.dw_val2 = 0L; - deh_mgr->err_info.dw_val3 = 0L; - deh_mgr->err_info.dw_val1 = dwErrInfo; dev_err(bridge, "%s: %s, err_info = 0x%x\n", __func__, "DSP_PWRERROR", dwErrInfo); break; #endif /* CONFIG_BRIDGE_NTFY_PWRERR */ case DSP_WDTOVERFLOW: - deh_mgr->err_info.dw_err_mask = DSP_WDTOVERFLOW; - deh_mgr->err_info.dw_val1 = 0L; - deh_mgr->err_info.dw_val2 = 0L; - deh_mgr->err_info.dw_val3 = 0L; dev_err(bridge, "%s: DSP_WDTOVERFLOW\n", __func__); break; default: