mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
modules: watchdog_cpu_ctx update for 4.14
Remove the stack pointer reference from the stackframe struct as it has been removed from the kernel. Change-Id: Ib0c55d1e84854e7a61e70f347b8d4171c61ca130 Signed-off-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-on: https://gerrit.mot.com/1209023 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
befb746866
commit
9588dc216f
1 changed files with 12 additions and 6 deletions
|
|
@ -36,6 +36,10 @@
|
|||
#include <soc/qcom/mmi_boot_info.h>
|
||||
#include "watchdog_cpu_ctx.h"
|
||||
|
||||
#ifndef TASK_STATE_TO_CHAR_STR
|
||||
#define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWPNn"
|
||||
#endif
|
||||
|
||||
#define MSMDBG(fmt, args...) mmi_annotate(fmt, ##args)
|
||||
|
||||
#define MSMWDT_ERR(fmt, args...) do { \
|
||||
|
|
@ -259,18 +263,19 @@ static void msm_wdt_show_thread_saved_pc(struct task_struct *p)
|
|||
}
|
||||
|
||||
static int msm_wdt_unwind_frame_aa64(struct stackframe *frame,
|
||||
unsigned long stack)
|
||||
unsigned long stack,
|
||||
unsigned long *sp)
|
||||
{
|
||||
unsigned long high, low;
|
||||
unsigned long fp = frame->fp;
|
||||
|
||||
low = frame->sp;
|
||||
low = *sp;
|
||||
high = ALIGN(low, THREAD_SIZE) - 0x20;
|
||||
|
||||
if (fp < low || fp > high || fp & 0xf)
|
||||
return -EINVAL;
|
||||
|
||||
frame->sp = fp + 0x10;
|
||||
*sp = (unsigned long)(fp + 0x10);
|
||||
frame->fp = (*(unsigned long *)(fp) & (THREAD_SIZE - 1)) + stack;
|
||||
frame->pc = *(unsigned long *)(fp + 8);
|
||||
|
||||
|
|
@ -363,6 +368,7 @@ static void msm_wdt_unwind(struct sysdbgCPUCtxtType *sysdbg_ctx,
|
|||
unsigned long stack)
|
||||
{
|
||||
struct stackframe frame;
|
||||
unsigned long sp;
|
||||
int offset;
|
||||
char sym_buf[KSYM_NAME_LEN];
|
||||
struct sysdbg_cpu_ctxt_regs *regs = &sysdbg_ctx->cpu_regs;
|
||||
|
|
@ -375,7 +381,7 @@ static void msm_wdt_unwind(struct sysdbgCPUCtxtType *sysdbg_ctx,
|
|||
|
||||
if ((regs->sp_el1 & ~(THREAD_SIZE - 1)) == addr) {
|
||||
frame.fp = (regs->x29 & (THREAD_SIZE - 1)) + stack;
|
||||
frame.sp = (regs->sp_el1 & (THREAD_SIZE - 1)) + stack;
|
||||
sp = (regs->sp_el1 & (THREAD_SIZE - 1)) + stack;
|
||||
frame.pc = regs->pc;
|
||||
}
|
||||
else {
|
||||
|
|
@ -383,7 +389,7 @@ static void msm_wdt_unwind(struct sysdbgCPUCtxtType *sysdbg_ctx,
|
|||
return;
|
||||
}
|
||||
|
||||
offset = (frame.sp - stack - 128) & ~(128 - 1);
|
||||
offset = (sp - stack - 128) & ~(128 - 1);
|
||||
msm_wdt_show_raw_mem(stack, 96, addr, "thread_info");
|
||||
msm_wdt_show_raw_mem(stack + offset, THREAD_SIZE - offset,
|
||||
addr + offset, "stack");
|
||||
|
|
@ -406,7 +412,7 @@ static void msm_wdt_unwind(struct sysdbgCPUCtxtType *sysdbg_ctx,
|
|||
frame.pc - kaslr_offset + cur_kaslr_offset);
|
||||
MSMWDTD("[<%016lx>] %s\n", where, sym_buf);
|
||||
|
||||
urc = msm_wdt_unwind_frame_aa64(&frame, stack);
|
||||
urc = msm_wdt_unwind_frame_aa64(&frame, stack, &sp);
|
||||
if (urc < 0)
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue