diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-07-04 02:57:44 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-10-18 19:46:18 -0400 |
commit | 3743c9b8ceb638b6e4b78b42f2262e22aa6359f0 (patch) | |
tree | cb9ceac93aef5ed982b5791dc56064ab4d1e9da4 /arch/powerpc/kernel/process.c | |
parent | 51ae8d4a2b9e4aa9a502061b9c39168e08829b94 (diff) |
powerpc: export debug registers save function for KVM
KVM need this function when switching from vcpu to user-space
thread. My subsequent patch will use this function.
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 3db9d7e39f39..4d42c4de8b9b 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -371,12 +371,13 @@ static void prime_debug_regs(struct thread_struct *thread) | |||
371 | * debug registers, set the debug registers from the values | 371 | * debug registers, set the debug registers from the values |
372 | * stored in the new thread. | 372 | * stored in the new thread. |
373 | */ | 373 | */ |
374 | static void switch_booke_debug_regs(struct thread_struct *new_thread) | 374 | void switch_booke_debug_regs(struct thread_struct *new_thread) |
375 | { | 375 | { |
376 | if ((current->thread.debug.dbcr0 & DBCR0_IDM) | 376 | if ((current->thread.debug.dbcr0 & DBCR0_IDM) |
377 | || (new_thread->debug.dbcr0 & DBCR0_IDM)) | 377 | || (new_thread->debug.dbcr0 & DBCR0_IDM)) |
378 | prime_debug_regs(new_thread); | 378 | prime_debug_regs(new_thread); |
379 | } | 379 | } |
380 | EXPORT_SYMBOL_GPL(switch_booke_debug_regs); | ||
380 | #else /* !CONFIG_PPC_ADV_DEBUG_REGS */ | 381 | #else /* !CONFIG_PPC_ADV_DEBUG_REGS */ |
381 | #ifndef CONFIG_HAVE_HW_BREAKPOINT | 382 | #ifndef CONFIG_HAVE_HW_BREAKPOINT |
382 | static void set_debug_reg_defaults(struct thread_struct *thread) | 383 | static void set_debug_reg_defaults(struct thread_struct *thread) |