OMAP: L3 interconnect: Error reporting cleanups
Subsystems (3)
PATCH 1/1 OMAP: L3 interconnect: Error reporting cleanups
* Make variables static.
* Define L3 TARG instance offsets, and read/write STDERRLOG registers relative to those offsets, rather than defining STDERRLOG_MAIN instance offsets and accessing other registers via offsets from that register.
* Use ffs() to find error source from the L3_FLAGMUX_REGERRn register.
* Remove extra l3_base[] entry.
* Modify L3 custom error message for consistency with standard error message.
---
V2 updated for feedback from Santosh (thanks!).
arch/arm/mach-omap2/omap_l3_noc.c | 38 +++++++++--------- arch/arm/mach-omap2/omap_l3_noc.h | 82 ++++++++++++++++++------------------ 2 files changed, 60 insertions(+), 60 deletions(-)
arch/arm/mach-omap2/omap_l3_noc.c +19 -19
@@ -29,6 +29,7 @@#include "omap_l3_noc.h" +/* * Interrupt Handler for L3 error detection. * 1) Identify the L3 clockdomain partition to which the error belongs to.
@@ -56,10 +57,10 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) {struct omap4_l3 *l3 = _l3; -int inttype, i, j; +int inttype, i;int err_src =0 ; -u32 std_err_main_addr, std_err_main, err_reg; -u32 base, slave_addr, clear; +u32 l3_targ_base, std_err_main, err_reg; +u32 base, clear;char *source_name;/* Get the Type of interrupt */
@@ -76,37 +77,36 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)/* Get the corresponding error and analyse */ if (err_reg) {/* Identify the source from control status register */ -for (j =0 ; !(err_reg & (1 << j)); j++) - ; - - err_src = j; + err_src =__ffs (err_reg);/* Read the stderrlog_main_source from clk domain */ - std_err_main_addr = base + *(l3_targ[i] + err_src); - std_err_main =readl (std_err_main_addr); + l3_targ_base = base + (*(l3_targ[i] + err_src)); + std_err_main =readl (l3_targ_base + +L3_TARG_STDERRLOG_MAIN );switch (std_err_main &CUSTOM_ERROR ) {case STANDARD_ERROR : source_name = - l3_targ_stderrlog_main_name[i][err_src]; - - slave_addr = std_err_main_addr + -L3_SLAVE_ADDRESS_OFFSET ; + l3_targ_inst_name[i][err_src];WARN (true,"L3 standard error: SOURCE:%s at address 0x%x\n" , - source_name,readl (slave_addr)); + source_name, +readl (l3_targ_base + +L3_TARG_STDERRLOG_SLVOFSLSB ));/* clear the std error log*/ clear = std_err_main |CLEAR_STDERR_LOG ; -writel (clear, std_err_main_addr); +writel (clear, l3_targ_base + +L3_TARG_STDERRLOG_MAIN );break ;case CUSTOM_ERROR : source_name = - l3_targ_stderrlog_main_name[i][err_src]; + l3_targ_inst_name[i][err_src]; -WARN (true,"CUSTOM SRESP error with SOURCE:%s\n" , - source_name); +WARN (true,"L3 custom error: SOURCE:%s\n" , + source_name);/* clear the std error log*/ clear = std_err_main |CLEAR_STDERR_LOG ; -writel (clear, std_err_main_addr); +writel (clear, l3_targ_base + +L3_TARG_STDERRLOG_MAIN );break ;default :
arch/arm/mach-omap2/omap_l3_noc.h +41 -41
121 lines not on this page · raw message
Signature · 1 line
1.7.3.1
Todd,
Quoted 12 lines · Todd Poynor
* Make variables static.
* Define L3 TARG instance offsets, and read/write STDERRLOG registers relative to those offsets, rather than defining
STDERRLOG_MAINinstance offsets and accessing other registers via offsets from that register.* Use
ffs()to find error source from theL3_FLAGMUX_REGERRnregister.* Remove extra l3_base[] entry.
Quoted 8 lines
* Modify L3 custom error message for consistency with standard error message.
Signed-off-by Todd Poynor<[email protected]>---
V2 updated for feedback from Santosh (thanks!).
Thanks Todd.
Will add this patch along with other patches
on interconnect files.
Regards
Santosh