Statistics
| Branch: | Revision:

root / hw / openrisc / pic_cpu.c @ f53f81e0

History | View | Annotate | Download (1.6 kB)

# Date Author Comment
7717f248 08/21/2013 04:31 am Jia Liu

hw/openrisc: Avoid undefined shift in openrisc_pic_cpu_handler()

In C99 signed shift (1 << 31) is undefined behavior, since the result
exceeds INT_MAX. Use 1U instead and move the shift after the check.

Signed-off-by: Xi Wang <>
Acked-by: Jia Liu <>

ed396e2b 08/21/2013 04:23 am Jia Liu

hw/openrisc: Fix masking in openrisc_pic_cpu_handler()

Consider the masking of PICSR and PICMR:

((cpu->env.picsr && (1 << i)) && (cpu->env.picmr && (1 << i)))

To correctly mask bits, we should use the bitwise AND "&" rather than
the logical AND "&&". Also, the loop is not necessary for masking....

d8ed887b 03/12/2013 11:35 am Andreas Färber

exec: Pass CPUState to cpu_reset_interrupt()

Move it to qom/cpu.c to avoid build failures depending on include order
of cpu-qom.h and exec/cpu-all.h.

Change opaques of various ..._irq_handler() functions to the
appropriate CPU type to facilitate using cpu_reset_interrupt()....

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

Signed-off-by: Andreas Färber <>

53018216 03/01/2013 04:01 pm Paolo Bonzini

hw: move boards and other isolated files to hw/ARCH

Signed-off-by: Paolo Bonzini <>