summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/bookehv_interrupts.S
diff options
context:
space:
mode:
authorTiejun Chen <tiejun.chen@windriver.com>2013-10-23 05:26:48 +0400
committerAlexander Graf <agraf@suse.de>2014-01-09 13:15:10 +0400
commit9bd880a2c882d2181b1eaba0aed422cced8f0e8a (patch)
tree04d627755115ed0d56e2538f0c7436dd0fff60c3 /arch/powerpc/kvm/bookehv_interrupts.S
parent08c9a188d0d0fc0f0c5e17d89a06bb59c493110f (diff)
downloadlinux-9bd880a2c882d2181b1eaba0aed422cced8f0e8a.tar.xz
KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state
Rather than calling hard_irq_disable() when we're back in C code we can just call RECONCILE_IRQ_STATE to soft disable IRQs while we're already in hard disabled state. This should be functionally equivalent to the code before, but cleaner and faster. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> [agraf: fix comment, commit message] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/bookehv_interrupts.S')
-rw-r--r--arch/powerpc/kvm/bookehv_interrupts.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index e8ed7d659c55..be3de1dd7bb3 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -33,6 +33,8 @@
#ifdef CONFIG_64BIT
#include <asm/exception-64e.h>
+#include <asm/hw_irq.h>
+#include <asm/irqflags.h>
#else
#include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */
#endif
@@ -465,6 +467,15 @@ _GLOBAL(kvmppc_resume_host)
mtspr SPRN_EPCR, r3
isync
+#ifdef CONFIG_64BIT
+ /*
+ * We enter with interrupts disabled in hardware, but
+ * we need to call RECONCILE_IRQ_STATE to ensure
+ * that the software state is kept in sync.
+ */
+ RECONCILE_IRQ_STATE(r3,r5)
+#endif
+
/* Switch to kernel stack and jump to handler. */
PPC_LL r3, HOST_RUN(r1)
mr r5, r14 /* intno */