diff options
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 4f3c5756cc09..bf91658a8a40 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/pgtable.h> | 39 | #include <asm/pgtable.h> |
40 | #include <asm/switch_to.h> | 40 | #include <asm/switch_to.h> |
41 | #include <asm/tm.h> | ||
41 | 42 | ||
42 | #define CREATE_TRACE_POINTS | 43 | #define CREATE_TRACE_POINTS |
43 | #include <trace/events/syscalls.h> | 44 | #include <trace/events/syscalls.h> |
@@ -118,6 +119,24 @@ static const struct pt_regs_offset regoffset_table[] = { | |||
118 | REG_OFFSET_END, | 119 | REG_OFFSET_END, |
119 | }; | 120 | }; |
120 | 121 | ||
122 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | ||
123 | static void flush_tmregs_to_thread(struct task_struct *tsk) | ||
124 | { | ||
125 | /* | ||
126 | * If task is not current, it will have been flushed already to | ||
127 | * it's thread_struct during __switch_to(). | ||
128 | * | ||
129 | * A reclaim flushes ALL the state. | ||
130 | */ | ||
131 | |||
132 | if (tsk == current && MSR_TM_SUSPENDED(mfmsr())) | ||
133 | tm_reclaim_current(TM_CAUSE_SIGNAL); | ||
134 | |||
135 | } | ||
136 | #else | ||
137 | static inline void flush_tmregs_to_thread(struct task_struct *tsk) { } | ||
138 | #endif | ||
139 | |||
121 | /** | 140 | /** |
122 | * regs_query_register_offset() - query register offset from its name | 141 | * regs_query_register_offset() - query register offset from its name |
123 | * @name: the name of a register | 142 | * @name: the name of a register |