aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/paca.h3
-rw-r--r--arch/powerpc/kernel/asm-offsets.c1
-rw-r--r--arch/powerpc/kernel/entry_64.S4
-rw-r--r--arch/powerpc/kernel/process.c3
4 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
index 4b74c6c9d82a..77c91e74b612 100644
--- a/arch/powerpc/include/asm/paca.h
+++ b/arch/powerpc/include/asm/paca.h
@@ -137,6 +137,9 @@ struct paca_struct {
137 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */ 137 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */
138 u8 nap_state_lost; /* NV GPR values lost in power7_idle */ 138 u8 nap_state_lost; /* NV GPR values lost in power7_idle */
139 u64 sprg3; /* Saved user-visible sprg */ 139 u64 sprg3; /* Saved user-visible sprg */
140#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
141 u64 tm_scratch; /* TM scratch area for reclaim */
142#endif
140 143
141#ifdef CONFIG_PPC_POWERNV 144#ifdef CONFIG_PPC_POWERNV
142 /* Pointer to OPAL machine check event structure set by the 145 /* Pointer to OPAL machine check event structure set by the
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 0fdc97496d7c..781190367292 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -126,6 +126,7 @@ int main(void)
126 DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar)); 126 DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar));
127#endif 127#endif
128#ifdef CONFIG_PPC_TRANSACTIONAL_MEM 128#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
129 DEFINE(PACATMSCRATCH, offsetof(struct paca_struct, tm_scratch));
129 DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar)); 130 DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar));
130 DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr)); 131 DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr));
131 DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar)); 132 DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar));
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 9ae8451bbc83..612ea130c5d2 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -785,6 +785,10 @@ fast_exception_return:
785 andc r4,r4,r0 /* r0 contains MSR_RI here */ 785 andc r4,r4,r0 /* r0 contains MSR_RI here */
786 mtmsrd r4,1 786 mtmsrd r4,1
787 787
788#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
789 /* TM debug */
790 std r3, PACATMSCRATCH(r13) /* Stash returned-to MSR */
791#endif
788 /* 792 /*
789 * r13 is our per cpu area, only restore it if we are returning to 793 * r13 is our per cpu area, only restore it if we are returning to
790 * userspace the value stored in the stack frame may belong to 794 * userspace the value stored in the stack frame may belong to
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index b0a0321e4bb6..1cc40533021b 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -754,6 +754,9 @@ void show_regs(struct pt_regs * regs)
754 printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); 754 printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip);
755 printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); 755 printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link);
756#endif 756#endif
757#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
758 printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch);
759#endif
757 show_stack(current, (unsigned long *) regs->gpr[1]); 760 show_stack(current, (unsigned long *) regs->gpr[1]);
758 if (!user_mode(regs)) 761 if (!user_mode(regs))
759 show_instructions(regs); 762 show_instructions(regs);