[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] fix for arm_gic
From: |
Adam Lackorzynski |
Subject: |
[Qemu-devel] [PATCH] fix for arm_gic |
Date: |
Wed, 4 Oct 2006 15:49:06 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
the priority array of the gic_state structure contains 96 elements but
gic_set_running_irq is also called with irq == 1023 so that without the
fix some random value is used for s->running_priority.
The printf patch is necessary to make the DPRINTFs work.
Index: arm_gic.c
===================================================================
RCS file: /sources/qemu/qemu/hw/arm_gic.c,v
retrieving revision 1.2
diff -u -r1.2 arm_gic.c
--- arm_gic.c 1 Oct 2006 13:03:52 -0000 1.2
+++ arm_gic.c 4 Oct 2006 13:39:24 -0000
@@ -17,7 +17,7 @@
#ifdef DEBUG_GIC
#define DPRINTF(fmt, args...) \
-do { printf("arm_gic: " fmt , (int)s->base, ##args); } while (0)
+do { printf("arm_gic(%x): " fmt , (int)s->base, ##args); } while (0)
#else
#define DPRINTF(fmt, args...) do {} while(0)
#endif
@@ -135,7 +135,7 @@
static void gic_set_running_irq(gic_state *s, int irq)
{
s->running_irq = irq;
- s->running_priority = s->priority[irq];
+ s->running_priority = (irq == 1023) ? 0x100 : s->priority[irq];
gic_update(s);
}
Thanks,
Adam
--
Adam address@hidden
Lackorzynski http://os.inf.tu-dresden.de/~adam/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] fix for arm_gic,
Adam Lackorzynski <=