From 5d733eba33da84cb5a390773491f5c255b6512fc Mon Sep 17 00:00:00 2001 From: Carlo Marcelo Arenas Belon Date: Sat, 17 Nov 2007 23:25:19 -0600 Subject: [PATCH] Simulate edge-triggered interrupt in master PIC for time-drift-fix The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the parent PIC pointer is used to send the edge irq0 instead of the PIC pair and that is an incompatible pointer type as reported in : qemu/hw/i8259.c: In function `pic_read_irq': qemu/hw/i8259.c:248: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type qemu/hw/i8259.c:249: warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type the code is equivalent as the compiler packs the PicState2 struct for s in a way that makes "s" and "&s->pics[0]" point to the same address. Signed-off-by: Carlo Marcelo Arenas Belon Signed-off-by: Avi Kivity --- hw/i8259.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i8259.c b/hw/i8259.c index 01447d7a7a..60063d41db 100644 --- a/hw/i8259.c +++ b/hw/i8259.c @@ -245,8 +245,8 @@ int pic_read_irq(PicState2 *s) if (timer_ints_to_push > 0) { timer_ints_to_push--; /* simulate an edge irq0, like the one generated by i8254 */ - pic_set_irq1(s, 0, 0); - pic_set_irq1(s, 0, 1); + pic_set_irq1(&s->pics[0], 0, 0); + pic_set_irq1(&s->pics[0], 0, 1); } } -- 2.11.4.GIT