diff options
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index 92c6bbbde48..5228f99942f 100644 --- a/drivers/remoteproc/remoteproc.c +++ b/drivers/remoteproc/remoteproc.c @@ -272,9 +272,8 @@ static int setup_rproc_elf_core_dump(struct core_rproc *d) { short __phnum; struct elf_phdr *nphdr; - struct exc_regs *xregs = d->rproc->cdump_buf1; - struct pt_regs *regs = - (struct pt_regs *)&d->core.core_note.prstatus.pr_reg; + struct exc_regs *xregs; + struct pt_regs *regs; memset(&d->core.elf, 0, sizeof(d->core.elf)); @@ -309,8 +308,12 @@ static int setup_rproc_elf_core_dump(struct core_rproc *d) d->core.core_note.note_prstatus.n_type = NT_PRSTATUS; memcpy(d->core.core_note.name, CORE_STR, sizeof(CORE_STR)); - remoteproc_fill_pt_regs(regs, xregs); - + /* fill in registers for ipu only, dsp yet to be supported */ + if (!strcmp(d->rproc->name, "ipu")) { + xregs = d->rproc->cdump_buf1; + regs = (struct pt_regs *)&d->core.core_note.prstatus.pr_reg; + remoteproc_fill_pt_regs(regs, xregs); + } /* We ignore the NVIC registers for now */ d->offset = sizeof(struct core); @@ -770,7 +773,8 @@ static int rproc_add_mem_entry(struct rproc *rproc, struct fw_resource *rsc) * Perhaps the ION carveout should be reported as RSC_DEVMEM. */ me->core = (rsc->type == RSC_CARVEOUT && - strcmp(rsc->name, "IPU_MEM_IOBUFS")); + strcmp(rsc->name, "IPU_MEM_IOBUFS") && + strcmp(rsc->name, "DSP_MEM_IOBUFS")); #endif } |