diff options
author | Alexander Graf <agraf@suse.de> | 2009-12-18 23:37:26 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-19 16:04:52 +0100 |
commit | d14ed2548c3163cdb316eb4da36cd7a6a8975da4 (patch) | |
tree | 5c155c9c61bf7114a6bc9ef19336b648e29b9a75 /hw | |
parent | 0aced4e219f81ab583b2d99663e13c3278d163ea (diff) | |
download | hqemu-d14ed2548c3163cdb316eb4da36cd7a6a8975da4.zip hqemu-d14ed2548c3163cdb316eb4da36cd7a6a8975da4.tar.gz |
target-ppc: Initialize OpenPIC properly
When lowering an IRQ line, we search for the line we're supposed to lower.
Usually we run into an optimization there that queues up interrupts. This
queue ends with -1. Unfortunately we didn't set the first item to -1.
This patch fixes this, making interrupts work on PPC64.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/openpic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/openpic.c b/hw/openpic.c index 42db59d..1e4b3c1 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -442,7 +442,9 @@ static void openpic_reset (void *opaque) opp->dst[i].pctp = 0x0000000F; opp->dst[i].pcsr = 0x00000000; memset(&opp->dst[i].raised, 0, sizeof(IRQ_queue_t)); + opp->dst[i].raised.next = -1; memset(&opp->dst[i].servicing, 0, sizeof(IRQ_queue_t)); + opp->dst[i].servicing.next = -1; } /* Initialise timers */ for (i = 0; i < MAX_TMR; i++) { |