Patchwork [3/6] ioapic: add ioapic.h

login
register
mail settings
Submitter Blue Swirl
Date June 5, 2010, 9:30 p.m.
Message ID <AANLkTim6KmH0PeNrZOulsQCnobx2qDoNsJZHLzkZctWY@mail.gmail.com>
Download mbox | patch
Permalink /patch/54785/
State New
Headers show

Comments

Blue Swirl - June 5, 2010, 9:30 p.m.
Move IOAPIC declarations to a separate file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/apic.h    |    4 ----
 hw/ioapic.c  |    1 +
 hw/ioapic.h  |    7 +++++++
 hw/pc_piix.c |    2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)
 create mode 100644 hw/ioapic.h

Patch

diff --git a/hw/apic.h b/hw/apic.h
index c92d188..419c733 100644
--- a/hw/apic.h
+++ b/hw/apic.h
@@ -13,10 +13,6 @@  int apic_get_interrupt(CPUState *env);
 void apic_reset_irq_delivered(void);
 int apic_get_irq_delivered(void);

-/* ioapic.c */
-typedef struct IOAPICState IOAPICState;
-qemu_irq *ioapic_init(void);
-
 /* pc.c */
 int cpu_is_bsp(CPUState *env);

diff --git a/hw/ioapic.c b/hw/ioapic.c
index e3f8a46..0bcfff2 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -22,6 +22,7 @@ 

 #include "hw.h"
 #include "pc.h"
+#include "ioapic.h"
 #include "apic.h"
 #include "qemu-timer.h"
 #include "host-utils.h"
diff --git a/hw/ioapic.h b/hw/ioapic.h
new file mode 100644
index 0000000..0cbaad9
--- /dev/null
+++ b/hw/ioapic.h
@@ -0,0 +1,7 @@ 
+#ifndef IOAPIC_H
+#define IOAPIC_H
+
+typedef struct IOAPICState IOAPICState;
+qemu_irq *ioapic_init(void);
+
+#endif
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 70f563a..ac207f1 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -24,7 +24,7 @@ 

 #include "hw.h"
 #include "pc.h"
-#include "apic.h"
+#include "ioapic.h"
 #include "pci.h"
 #include "usb-uhci.h"
 #include "usb-ohci.h"