qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 10/17] pc.c: introduce a function to allocate cpu ir


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH 10/17] pc.c: introduce a function to allocate cpu irq.
Date: Thu, 9 Jul 2009 17:13:13 +0900

Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq
in order to make pic_irq_request() piix independent.
Later piix code will be split out to another file keeping pic_irq_request()
static.

Signed-off-by: Isaku Yamahata <address@hidden>
---
 hw/pc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index d12db9e..8fccecf 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1087,6 +1087,11 @@ static CPUState *pc_new_cpu(const char *cpu_model)
     return env;
 }
 
+static qemu_irq *pc_allocate_cpu_irq(void)
+{
+    return qemu_allocate_irqs(pic_irq_request, NULL, 1);
+}
+
 /* PC hardware initialisation */
 static void pc_init1(ram_addr_t ram_size,
                      const char *boot_device,
@@ -1252,7 +1257,7 @@ static void pc_init1(ram_addr_t ram_size,
                                            0xe0000);
     }
 
-    cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1);
+    cpu_irq = pc_allocate_cpu_irq();
     i8259 = i8259_init(cpu_irq[0]);
     ferr_irq = i8259[13];
 
-- 
1.6.0.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]