diff options
author | Iliyan Malchev <malchev@google.com> | 2011-10-13 18:15:49 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-10-13 18:16:02 -0700 |
commit | 696a56e8e70055bbea89bcc47e3502b59409fe51 (patch) | |
tree | c377df402a9f209e8f8696e2277242c87fee1935 /drivers/remoteproc | |
parent | 405b6316c4dd7585fa5f0114a3749525df41dd91 (diff) | |
download | kernel_samsung_tuna-696a56e8e70055bbea89bcc47e3502b59409fe51.tar.gz kernel_samsung_tuna-696a56e8e70055bbea89bcc47e3502b59409fe51.tar.bz2 kernel_samsung_tuna-696a56e8e70055bbea89bcc47e3502b59409fe51.zip |
remoteproc: introduce rproc method dump_registers
This patch introduces method dump_registers() in rproc_ops and replaces the
default function dump_remoteproc_regs() with one implemented by each remoteproc
(if defined.) Function dump_remoteproc_regs() called __show_regs(), which
attemps to print the registers given to it as if they belong to local SMPs
and further attempts to dump memory around the addresses pointed by some of
them. This is incorrect, as the memory in question does not necessarily even
belong to the local SMPs.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index f3ec8bcd0c3..007fc996022 100644 --- a/drivers/remoteproc/remoteproc.c +++ b/drivers/remoteproc/remoteproc.c @@ -547,14 +547,6 @@ rproc_da_to_pa(const struct rproc_mem_entry *maps, u64 da, phys_addr_t *pa) return -EINVAL; } -static void dump_remoteproc_regs(const char *name, struct exc_regs *xregs) -{ - struct pt_regs regs; - remoteproc_fill_pt_regs(®s, xregs); - pr_info("remoteproc %s: register dump\n", name); - __show_regs(®s); -} - static int rproc_mmu_fault_isr(struct rproc *rproc, u64 da, u32 flags) { dev_err(rproc->dev, "%s\n", __func__); @@ -604,8 +596,9 @@ static int _event_notify(struct rproc *rproc, int type, void *data) #ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND pm_runtime_dont_use_autosuspend(rproc->dev); #endif - dump_remoteproc_regs(rproc->name, - (struct exc_regs *)rproc->cdump_buf1); + if (rproc->ops->dump_registers) + rproc->ops->dump_registers(rproc); + if (!rproc->halt_on_crash) complete_remoteproc_crash(rproc); else |