aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-07 18:14:41 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-07 18:14:41 +0000
commitd537cf6c8624b27ce2b63431d2f8937f6356f652 (patch)
treed7173d79977b4426b2ff225b35c839c8a2e4a215 /hw/ppc.c
parentb6e27ab8b12ef6075d85fc505f821643804a3a79 (diff)
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc.c')
-rw-r--r--hw/ppc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/hw/ppc.c b/hw/ppc.c
index 273c75f026..44555bd634 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -31,8 +31,7 @@ extern int loglevel;
/* PowerPC internal fake IRQ controller
* used to manage multiple sources hardware events
*/
-/* XXX: should be protected */
-void ppc_set_irq (void *opaque, int n_IRQ, int level)
+static void ppc_set_irq (void *opaque, int n_IRQ, int level)
{
CPUState *env;
@@ -51,6 +50,17 @@ void ppc_set_irq (void *opaque, int n_IRQ, int level)
#endif
}
+void cpu_ppc_irq_init_cpu(CPUState *env)
+{
+ qemu_irq *qi;
+ int i;
+
+ qi = qemu_allocate_irqs(ppc_set_irq, env, 32);
+ for (i = 0; i < 32; i++) {
+ env->irq[i] = qi[i];
+ }
+}
+
/* External IRQ callback from OpenPIC IRQ controller */
void ppc_openpic_irq (void *opaque, int n_IRQ, int level)
{