mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
LoongArch: Print symbol info for $ra and CSR.ERA only for kernel-mode contexts
Otherwise the addresses wouldn't make sense at all. While at it, align the "map keys" to maintain right-alignment with the "estat:" line too; also swap the ERA and ra lines so all CSRs are shown together. Signed-off-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
f6a79b6036
commit
863b3795ef
1 changed files with 8 additions and 5 deletions
|
@ -183,16 +183,19 @@ static void __show_regs(const struct pt_regs *regs)
|
||||||
/* The slot for $zero is reused as the syscall restart flag */
|
/* The slot for $zero is reused as the syscall restart flag */
|
||||||
if (regs->regs[0])
|
if (regs->regs[0])
|
||||||
printk("syscall restart flag: %0*lx\n", GPR_FIELD(0));
|
printk("syscall restart flag: %0*lx\n", GPR_FIELD(0));
|
||||||
|
|
||||||
|
if (user_mode(regs)) {
|
||||||
|
printk(" ra: %0*lx\n", GPR_FIELD(1));
|
||||||
|
printk(" ERA: %0*lx\n", field, regs->csr_era);
|
||||||
|
} else {
|
||||||
|
printk(" ra: %0*lx %pS\n", GPR_FIELD(1), (void *) regs->regs[1]);
|
||||||
|
printk(" ERA: %0*lx %pS\n", field, regs->csr_era, (void *) regs->csr_era);
|
||||||
|
}
|
||||||
#undef GPR_FIELD
|
#undef GPR_FIELD
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Saved csr registers
|
* Saved csr registers
|
||||||
*/
|
*/
|
||||||
printk("era : %0*lx %pS\n", field, regs->csr_era,
|
|
||||||
(void *) regs->csr_era);
|
|
||||||
printk("ra : %0*lx %pS\n", field, regs->regs[1],
|
|
||||||
(void *) regs->regs[1]);
|
|
||||||
|
|
||||||
printk("CSR crmd: %08lx ", regs->csr_crmd);
|
printk("CSR crmd: %08lx ", regs->csr_crmd);
|
||||||
printk("CSR prmd: %08lx ", regs->csr_prmd);
|
printk("CSR prmd: %08lx ", regs->csr_prmd);
|
||||||
printk("CSR euen: %08lx ", regs->csr_euen);
|
printk("CSR euen: %08lx ", regs->csr_euen);
|
||||||
|
|
Loading…
Reference in a new issue