On Wed, Nov 27, 2013 at 1:36 PM, Li Guang<address@hidden> wrote:
Li Guang wrote:
Peter Crosthwaite wrote:
On Tue, Nov 26, 2013 at 5:22 PM, liguang<address@hidden> wrote:
Signed-off-by: liguang<address@hidden>
---
default-configs/arm-softmmu.mak | 1 +
hw/intc/Makefile.objs | 1 +
hw/intc/sunxi-pic.c | 238
+++++++++++++++++++++++++++++++++++++++
include/hw/intc/sunxi-pic.h | 20 ++++
+
+static void sunxi_pic_set_irq(void *opaque, int irq, int level)
+{
+ SunxiPICState *s = opaque;
+
+ if (level) {
+ set_bit(irq, (void *)&s->irq_pending[irq/32]);
set_bit(irq % 32, ...)
OK
No, it is wrong,
irq/32 is right.
The irq/32 is right I agree. This issue is the first arugment.
Shouln't the whole thing be:
set_bit(irq%32, (void *)&s->irq_pending[irq/32]);