[PATCH unit-tests 07/16] Move irq_(enable|disable) into library code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx>
---
 lib/x86/processor.h |   10 ++++++++++
 x86/apic.c          |   10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/x86/processor.h b/lib/x86/processor.h
index c3ab109..52881a3 100644
--- a/lib/x86/processor.h
+++ b/lib/x86/processor.h
@@ -280,4 +280,14 @@ static inline void wrtsc(u64 tsc)
 	asm volatile("wrmsr" : : "a"(a), "d"(d), "c"(0x10));
 }
 
+static inline void irq_disable(void)
+{
+    asm volatile("cli");
+}
+
+static inline void irq_enable(void)
+{
+    asm volatile("sti");
+}
+
 #endif
diff --git a/x86/apic.c b/x86/apic.c
index 4f05b02..3dd2485 100644
--- a/x86/apic.c
+++ b/x86/apic.c
@@ -134,16 +134,6 @@ static void handle_irq(unsigned vec, void (*func)(isr_regs_t *regs))
 #endif
 }
 
-static void irq_disable(void)
-{
-    asm volatile("cli");
-}
-
-static void irq_enable(void)
-{
-    asm volatile("sti");
-}
-
 static void eoi(void)
 {
     apic_write(APIC_EOI, 0);
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux