From patchwork Tue Dec 4 02:42:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/13] pseries: Fix incorrect initialization of interrupt controller Date: Mon, 03 Dec 2012 16:42:05 -0000 From: David Gibson X-Patchwork-Id: 203549 Message-Id: <1354588937-27122-2-git-send-email-david@gibson.dropbear.id.au> To: agraf@suse.de Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Currently in the reset code for the XICS interrupt controller, we initialize the pending_priority field to 0 (most favored, by XICS convention). This is incorrect, since there is no pending interrupt, it should be set to least favored - 0xff. At the moment our XICS implementation doesn't get hurt by this edge case, but it does confuse the upcoming kernel XICS implementation. Signed-off-by: David Gibson --- hw/xics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xics.c b/hw/xics.c index 1da3106..edf5833 100644 --- a/hw/xics.c +++ b/hw/xics.c @@ -495,7 +495,7 @@ static void xics_reset(void *opaque) for (i = 0; i < icp->nr_servers; i++) { icp->ss[i].xirr = 0; - icp->ss[i].pending_priority = 0; + icp->ss[i].pending_priority = 0xff; icp->ss[i].mfrr = 0xff; /* Make all outputs are deasserted */ qemu_set_irq(icp->ss[i].output, 0);