diff --git a/drivers/firmware/rockchip_sip.c b/drivers/firmware/rockchip_sip.c index 46ab17e7603c..afbe394da825 100644 --- a/drivers/firmware/rockchip_sip.c +++ b/drivers/firmware/rockchip_sip.c @@ -332,16 +332,17 @@ static phys_addr_t ft_fiq_mem_phy; static void __iomem *ft_fiq_mem_base; static void (*sip_fiq_debugger_uart_irq_tf)(struct pt_regs _pt_regs, unsigned long cpu); +static struct pt_regs fiq_pt_regs; + int sip_fiq_debugger_is_enabled(void) { return fiq_sip_enabled; } EXPORT_SYMBOL_GPL(sip_fiq_debugger_is_enabled); -static struct pt_regs sip_fiq_debugger_get_pt_regs(void *reg_base, - unsigned long sp_el1) +static void sip_fiq_debugger_get_pt_regs(void *reg_base, + unsigned long sp_el1) { - struct pt_regs fiq_pt_regs; __maybe_unused struct sm_nsec_ctx *nsec_ctx = reg_base; __maybe_unused struct gp_regs_ctx *gp_regs = reg_base; @@ -413,21 +414,18 @@ static struct pt_regs sip_fiq_debugger_get_pt_regs(void *reg_base, fiq_pt_regs.ARM_pc = nsec_ctx->und_lr; } #endif - - return fiq_pt_regs; } static void sip_fiq_debugger_uart_irq_tf_cb(unsigned long sp_el1, unsigned long offset, unsigned long cpu) { - struct pt_regs fiq_pt_regs; char *cpu_context; /* calling fiq handler */ if (ft_fiq_mem_base) { cpu_context = (char *)ft_fiq_mem_base + offset; - fiq_pt_regs = sip_fiq_debugger_get_pt_regs(cpu_context, sp_el1); + sip_fiq_debugger_get_pt_regs(cpu_context, sp_el1); sip_fiq_debugger_uart_irq_tf(fiq_pt_regs, cpu); }