public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH unit-tests 07/16] Move irq_(enable|disable) into library code.
Date: Wed, 22 Dec 2010 17:06:20 +0200	[thread overview]
Message-ID: <1293030389-1143-8-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1293030389-1143-1-git-send-email-gleb@redhat.com>


Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
 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


  parent reply	other threads:[~2010-12-22 15:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 15:06 [PATCH unit-tests 00/16] task switch and event injection tests Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 01/16] Move idt.c into lib code Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 02/16] Make access.c use library functions Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 03/16] Remove duplicated idt code from apic test Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 04/16] Remove unused function " Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 05/16] Rename idt.[ch] into desc.[ch] Gleb Natapov
2010-12-29  9:38   ` Avi Kivity
2010-12-22 15:06 ` [PATCH unit-tests 06/16] Specify correct operand length for ltr and str Gleb Natapov
2010-12-29  9:37   ` Avi Kivity
2010-12-29  9:40     ` Gleb Natapov
2010-12-29  9:43       ` Gleb Natapov
2010-12-29  9:47         ` Avi Kivity
2010-12-22 15:06 ` Gleb Natapov [this message]
2010-12-22 15:06 ` [PATCH unit-tests 08/16] Add another task switch test Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 09/16] Move vm.[ch] info library code Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 10/16] Fix mmu on 32 bit Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 11/16] Set WP bit in CR0 to make write protection work Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 12/16] Fix exception handling on i386 arch Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 13/16] Move handle_irq() from apic test into library code Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 14/16] Add handle_exception() interface Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 15/16] Move invlpg() into library code Gleb Natapov
2010-12-22 15:06 ` [PATCH unit-tests 16/16] Add even injection test Gleb Natapov

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=1293030389-1143-8-git-send-email-gleb@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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