Commit b6871448 authored by Felipe Contreras's avatar Felipe Contreras Committed by Greg Kroah-Hartman

staging: ti dspbridge: deh: remove err_info

We only use it to pass the MMU fault address.
Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 654fe1b2
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
struct deh_mgr { struct deh_mgr {
struct bridge_dev_context *hbridge_context; /* Bridge context. */ struct bridge_dev_context *hbridge_context; /* Bridge context. */
struct ntfy_object *ntfy_obj; /* NTFY object */ struct ntfy_object *ntfy_obj; /* NTFY object */
struct dsp_errorinfo err_info; /* DSP exception info. */ u32 fault_addr;
/* MMU Fault DPC */ /* MMU Fault DPC */
struct tasklet_struct dpc_tasklet; struct tasklet_struct dpc_tasklet;
......
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
#include "_tiomap.h" #include "_tiomap.h"
#include "mmu_fault.h" #include "mmu_fault.h"
u32 fault_addr;
/* /*
* ======== mmu_fault_dpc ======== * ======== mmu_fault_dpc ========
* Deferred procedure call to handle DSP MMU fault. * Deferred procedure call to handle DSP MMU fault.
...@@ -78,9 +76,9 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData) ...@@ -78,9 +76,9 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData)
hw_mmu_event_status(resources->dw_dmmu_base, &dmmu_event_mask); hw_mmu_event_status(resources->dw_dmmu_base, &dmmu_event_mask);
if (dmmu_event_mask == HW_MMU_TRANSLATION_FAULT) { 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__, 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 * Schedule a DPC directly. In the future, it may be
* necessary to check if DSP MMU fault is intended for * necessary to check if DSP MMU fault is intended for
...@@ -88,11 +86,6 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData) ...@@ -88,11 +86,6 @@ irqreturn_t mmu_fault_isr(int irq, IN void *pRefData)
*/ */
tasklet_schedule(&deh_mgr_obj->dpc_tasklet); 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 /* Disable the MMU events, else once we clear it will
* start to raise INTs again */ * start to raise INTs again */
hw_mmu_event_disable(resources->dw_dmmu_base, hw_mmu_event_disable(resources->dw_dmmu_base,
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#ifndef MMU_FAULT_ #ifndef MMU_FAULT_
#define MMU_FAULT_ #define MMU_FAULT_
extern u32 fault_addr;
/* /*
* ======== mmu_fault_dpc ======== * ======== mmu_fault_dpc ========
* Deferred procedure call to handle DSP MMU fault. * Deferred procedure call to handle DSP MMU fault.
......
...@@ -84,10 +84,6 @@ int bridge_deh_create(struct deh_mgr **ret_deh_mgr, ...@@ -84,10 +84,6 @@ int bridge_deh_create(struct deh_mgr **ret_deh_mgr,
/* Fill in context structure */ /* Fill in context structure */
deh_mgr->hbridge_context = hbridge_context; 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 */ /* Install ISR function for DSP MMU fault */
status = request_irq(INT_DSP_MMU_IRQ, mmu_fault_isr, 0, status = request_irq(INT_DSP_MMU_IRQ, mmu_fault_isr, 0,
...@@ -140,7 +136,8 @@ int bridge_deh_register_notify(struct deh_mgr *deh_mgr, u32 event_mask, ...@@ -140,7 +136,8 @@ int bridge_deh_register_notify(struct deh_mgr *deh_mgr, u32 event_mask,
return ntfy_unregister(deh_mgr->ntfy_obj, hnotification); return ntfy_unregister(deh_mgr->ntfy_obj, hnotification);
} }
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 cfg_hostres *resources;
struct hw_mmu_map_attrs_t map_attrs = { struct hw_mmu_map_attrs_t map_attrs = {
...@@ -192,50 +189,29 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo) ...@@ -192,50 +189,29 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
switch (ulEventMask) { switch (ulEventMask) {
case DSP_SYSERROR: 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", dev_err(bridge, "%s: %s, err_info = 0x%x\n",
__func__, "DSP_SYSERROR", dwErrInfo); __func__, "DSP_SYSERROR", dwErrInfo);
dump_dl_modules(dev_context); dump_dl_modules(dev_context);
dump_dsp_stack(dev_context); dump_dsp_stack(dev_context);
break; break;
case DSP_MMUFAULT: 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", dev_err(bridge, "%s: %s, err_info = 0x%x\n",
__func__, "DSP_MMUFAULT", dwErrInfo); __func__, "DSP_MMUFAULT", dwErrInfo);
dev_info(bridge, "%s: %s, high=0x%x, low=0x%x, " dev_info(bridge, "%s: %s, fault=0x%x\n", __func__, "DSP_MMUFAULT",
"fault=0x%x\n", __func__, "DSP_MMUFAULT", deh_mgr->fault_addr);
(unsigned int) deh_mgr->err_info.dw_val1,
(unsigned int) deh_mgr->err_info.dw_val2,
(unsigned int) fault_addr);
print_dsp_trace_buffer(dev_context); print_dsp_trace_buffer(dev_context);
dump_dl_modules(dev_context); dump_dl_modules(dev_context);
mmu_fault_print_stack(dev_context); mmu_fault_print_stack(dev_context, deh_mgr->fault_addr);
break; break;
#ifdef CONFIG_BRIDGE_NTFY_PWRERR #ifdef CONFIG_BRIDGE_NTFY_PWRERR
case DSP_PWRERROR: 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", dev_err(bridge, "%s: %s, err_info = 0x%x\n",
__func__, "DSP_PWRERROR", dwErrInfo); __func__, "DSP_PWRERROR", dwErrInfo);
break; break;
#endif /* CONFIG_BRIDGE_NTFY_PWRERR */ #endif /* CONFIG_BRIDGE_NTFY_PWRERR */
case DSP_WDTOVERFLOW: 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__); dev_err(bridge, "%s: DSP_WDTOVERFLOW\n", __func__);
break; break;
default: default:
......
...@@ -428,7 +428,6 @@ struct dsp_errorinfo { ...@@ -428,7 +428,6 @@ struct dsp_errorinfo {
struct dsp_processorstate { struct dsp_processorstate {
u32 cb_struct; u32 cb_struct;
enum dsp_procstate proc_state; enum dsp_procstate proc_state;
struct dsp_errorinfo err_info;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment