From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 4/4] move apic functions to a separate apic.h header
Date: Wed, 6 May 2009 10:49:42 -0400 [thread overview]
Message-ID: <1241621382-21577-5-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1241621382-21577-4-git-send-email-glommer@redhat.com>
Later on, we'll want to call an apic function from helper.c.
The inclusion of pc.h, besides totally ugly, leads to a lot of
clashes.
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
hw/apic.c | 1 +
hw/apic.h | 19 +++++++++++++++++++
hw/ioapic.c | 1 +
hw/mc146818rtc.c | 1 +
hw/pc.c | 1 +
hw/pc.h | 15 ---------------
6 files changed, 23 insertions(+), 15 deletions(-)
create mode 100644 hw/apic.h
diff --git a/hw/apic.c b/hw/apic.c
index d63d74b..72dbe88 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -19,6 +19,7 @@
*/
#include "hw.h"
#include "pc.h"
+#include "apic.h"
#include "qemu-timer.h"
#include "host-utils.h"
diff --git a/hw/apic.h b/hw/apic.h
new file mode 100644
index 0000000..2437e9f
--- /dev/null
+++ b/hw/apic.h
@@ -0,0 +1,19 @@
+#ifndef _APIC_H_
+#define _APIC_H_
+
+/* APIC */
+typedef struct IOAPICState IOAPICState;
+void apic_deliver_irq(uint8_t dest, uint8_t dest_mode,
+ uint8_t delivery_mode,
+ uint8_t vector_num, uint8_t polarity,
+ uint8_t trigger_mode);
+int apic_init(CPUState *env);
+int apic_accept_pic_intr(CPUState *env);
+void apic_deliver_pic_intr(CPUState *env, int level);
+int apic_get_interrupt(CPUState *env);
+IOAPICState *ioapic_init(void);
+void ioapic_set_irq(void *opaque, int vector, int level);
+void apic_reset_irq_delivered(void);
+int apic_get_irq_delivered(void);
+
+#endif
diff --git a/hw/ioapic.c b/hw/ioapic.c
index 317c2c2..064f9ce 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -22,6 +22,7 @@
*/
#include "hw.h"
+#include "apic.h"
#include "pc.h"
#include "qemu-timer.h"
#include "host-utils.h"
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 888b85a..b71624f 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -25,6 +25,7 @@
#include "qemu-timer.h"
#include "sysemu.h"
#include "pc.h"
+#include "apic.h"
#include "isa.h"
#include "hpet_emul.h"
diff --git a/hw/pc.c b/hw/pc.c
index 06d1fca..2035705 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -23,6 +23,7 @@
*/
#include "hw.h"
#include "pc.h"
+#include "apic.h"
#include "fdc.h"
#include "pci.h"
#include "block.h"
diff --git a/hw/pc.h b/hw/pc.h
index 50e6c39..417ff65 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -40,21 +40,6 @@ uint32_t pic_intack_read(PicState2 *s);
void pic_info(Monitor *mon);
void irq_info(Monitor *mon);
-/* APIC */
-typedef struct IOAPICState IOAPICState;
-void apic_deliver_irq(uint8_t dest, uint8_t dest_mode,
- uint8_t delivery_mode,
- uint8_t vector_num, uint8_t polarity,
- uint8_t trigger_mode);
-int apic_init(CPUState *env);
-int apic_accept_pic_intr(CPUState *env);
-void apic_deliver_pic_intr(CPUState *env, int level);
-int apic_get_interrupt(CPUState *env);
-IOAPICState *ioapic_init(void);
-void ioapic_set_irq(void *opaque, int vector, int level);
-void apic_reset_irq_delivered(void);
-int apic_get_irq_delivered(void);
-
/* i8254.c */
#define PIT_FREQ 1193182
--
1.5.6.6
next prev parent reply other threads:[~2009-05-06 14:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 14:49 [Qemu-devel] [PATCH 0/4] Simplify cpu initialization Glauber Costa
2009-05-06 14:49 ` [Qemu-devel] [PATCH 1/4] move registering of cpu_reset to inside cpu_init Glauber Costa
2009-05-06 14:49 ` [Qemu-devel] [PATCH 2/4] move CPUID_APIC flag to where it belongs Glauber Costa
2009-05-06 14:49 ` [Qemu-devel] [PATCH 3/4] move halted state setting to inside of cpu_x86_init Glauber Costa
2009-05-06 14:49 ` Glauber Costa [this message]
2009-05-06 15:52 ` [Qemu-devel] Re: [PATCH 4/4] move apic functions to a separate apic.h header Jan Kiszka
2009-05-06 16:08 ` Glauber Costa
2009-05-06 15:45 ` [Qemu-devel] Re: [PATCH 3/4] move halted state setting to inside of cpu_x86_init Jan Kiszka
2009-05-06 19:31 ` [Qemu-devel] " Blue Swirl
2009-05-06 21:42 ` Glauber Costa
2009-05-06 15:40 ` [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs Jan Kiszka
2009-05-06 15:51 ` Glauber Costa
2009-05-06 17:29 ` Stanislav
2009-05-06 17:41 ` Glauber Costa
2009-05-06 17:43 ` Stanislav
2009-05-06 18:17 ` Anthony Liguori
2009-05-06 17:02 ` [Qemu-devel] Re: [PATCH 1/4] move registering of cpu_reset to inside cpu_init Jan Kiszka
2009-05-06 19:36 ` [Qemu-devel] " Blue Swirl
2009-05-06 21:45 ` Glauber Costa
-- strict thread matches above, loose matches on Subject: below --
2009-05-07 18:50 [Qemu-devel] [PATCH 0/4] Simplify cpu_init Glauber Costa
2009-05-07 18:51 ` [Qemu-devel] [PATCH 1/4] move registering of cpu_reset to inside cpu_init Glauber Costa
2009-05-07 18:51 ` [Qemu-devel] [PATCH 2/4] move CPUID_APIC flag to where it belongs Glauber Costa
2009-05-07 18:51 ` [Qemu-devel] [PATCH 3/4] move halted state setting to inside of cpu_x86_init Glauber Costa
2009-05-07 18:51 ` [Qemu-devel] [PATCH 4/4] move apic functions to a separate apic.h header Glauber Costa
2009-05-07 19:12 ` malc
2009-05-07 19:22 ` Glauber Costa
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=1241621382-21577-5-git-send-email-glommer@redhat.com \
--to=glommer@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).