mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 03:18:31 +00:00
powerpc: Add transactional memory paca scratch register to show_regs
Add transactional memory paca scratch register to show_regs. This is useful for debugging. Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
97a0aac9b8
commit
afc07701ce
4 changed files with 11 additions and 0 deletions
|
@ -137,6 +137,9 @@ struct paca_struct {
|
||||||
u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */
|
u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */
|
||||||
u8 nap_state_lost; /* NV GPR values lost in power7_idle */
|
u8 nap_state_lost; /* NV GPR values lost in power7_idle */
|
||||||
u64 sprg3; /* Saved user-visible sprg */
|
u64 sprg3; /* Saved user-visible sprg */
|
||||||
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
|
u64 tm_scratch; /* TM scratch area for reclaim */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_POWERNV
|
#ifdef CONFIG_PPC_POWERNV
|
||||||
/* Pointer to OPAL machine check event structure set by the
|
/* Pointer to OPAL machine check event structure set by the
|
||||||
|
|
|
@ -126,6 +126,7 @@ int main(void)
|
||||||
DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar));
|
DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar));
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
|
DEFINE(PACATMSCRATCH, offsetof(struct paca_struct, tm_scratch));
|
||||||
DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar));
|
DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar));
|
||||||
DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr));
|
DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr));
|
||||||
DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar));
|
DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar));
|
||||||
|
|
|
@ -785,6 +785,10 @@ fast_exception_return:
|
||||||
andc r4,r4,r0 /* r0 contains MSR_RI here */
|
andc r4,r4,r0 /* r0 contains MSR_RI here */
|
||||||
mtmsrd r4,1
|
mtmsrd r4,1
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
|
/* TM debug */
|
||||||
|
std r3, PACATMSCRATCH(r13) /* Stash returned-to MSR */
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* r13 is our per cpu area, only restore it if we are returning to
|
* r13 is our per cpu area, only restore it if we are returning to
|
||||||
* userspace the value stored in the stack frame may belong to
|
* userspace the value stored in the stack frame may belong to
|
||||||
|
|
|
@ -753,6 +753,9 @@ void show_regs(struct pt_regs * regs)
|
||||||
*/
|
*/
|
||||||
printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
|
printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
|
||||||
printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
|
printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
|
printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch);
|
||||||
#endif
|
#endif
|
||||||
show_stack(current, (unsigned long *) regs->gpr[1]);
|
show_stack(current, (unsigned long *) regs->gpr[1]);
|
||||||
if (!user_mode(regs))
|
if (!user_mode(regs))
|
||||||
|
|
Loading…
Reference in a new issue