From: Bharat Bhushan <r65777@freescale.com>
To: <kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>, <agraf@suse.de>,
<tiejun.chen@windriver.com>, <benh@kernel.crashing.org>,
<linuxppc-dev@lists.ozlabs.org>, <mikey@neuling.org>,
<scottwood@freescale.com>, <sfr@canb.auug.org.au>
Cc: Bharat Bhushan <bharat.bhushan@freescale.com>
Subject: [PATCH 1/4 v6] powerpc: export debug registers save function for KVM
Date: Thu, 4 Jul 2013 12:27:44 +0530 [thread overview]
Message-ID: <1372921067-19678-2-git-send-email-Bharat.Bhushan@freescale.com> (raw)
In-Reply-To: <1372921067-19678-1-git-send-email-Bharat.Bhushan@freescale.com>
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>
---
v5->v6
- switch_booke_debug_regs() not guarded by the compiler switch
arch/powerpc/include/asm/switch_to.h | 1 +
arch/powerpc/kernel/process.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index 200d763..db68f1d 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -29,6 +29,7 @@ extern void giveup_vsx(struct task_struct *);
extern void enable_kernel_spe(void);
extern void giveup_spe(struct task_struct *);
extern void load_up_spe(struct task_struct *);
+extern void switch_booke_debug_regs(struct thread_struct *new_thread);
#ifndef CONFIG_SMP
extern void discard_lazy_cpu_state(void);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 01ff496..da586aa 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -362,12 +362,13 @@ static void prime_debug_regs(struct thread_struct *thread)
* debug registers, set the debug registers from the values
* stored in the new thread.
*/
-static void switch_booke_debug_regs(struct thread_struct *new_thread)
+void switch_booke_debug_regs(struct thread_struct *new_thread)
{
if ((current->thread.debug.dbcr0 & DBCR0_IDM)
|| (new_thread->debug.dbcr0 & DBCR0_IDM))
prime_debug_regs(new_thread);
}
+EXPORT_SYMBOL_GPL(switch_booke_debug_regs);
#else /* !CONFIG_PPC_ADV_DEBUG_REGS */
#ifndef CONFIG_HAVE_HW_BREAKPOINT
static void set_debug_reg_defaults(struct thread_struct *thread)
--
1.7.0.4
next prev parent reply other threads:[~2013-07-04 7:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 6:57 [PATCH 0/4 v6] KVM :PPC: Userspace Debug support Bharat Bhushan
2013-07-04 6:57 ` Bharat Bhushan [this message]
2013-07-25 10:20 ` [PATCH 1/4 v6] powerpc: export debug registers save function for KVM Alexander Graf
2013-07-30 2:42 ` Michael Neuling
2013-07-04 6:57 ` [PATCH 2/4 v6] KVM: PPC: exit to user space on "ehpriv 1" instruction Bharat Bhushan
2013-07-04 6:57 ` [PATCH 3/4 v6] KVM: PPC: Using "struct debug_reg" Bharat Bhushan
2013-07-04 6:57 ` [PATCH 4/4 v6] KVM: PPC: Add userspace debug stub support Bharat Bhushan
2013-10-04 14:02 ` [PATCH 0/4 v6] KVM :PPC: Userspace Debug support Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372921067-19678-2-git-send-email-Bharat.Bhushan@freescale.com \
--to=r65777@freescale.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=bharat.bhushan@freescale.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=scottwood@freescale.com \
--cc=sfr@canb.auug.org.au \
--cc=tiejun.chen@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).