Skip to content

Commit

Permalink
Update initialization sequence to fix l2vic interrupts
Browse files Browse the repository at this point in the history
Looks like qdev_realize_and_unref must be called first otherwise the
associated irqs functions are null.

Signed-off-by: Sid Manning <[email protected]>
  • Loading branch information
SidManning committed Jan 3, 2025
1 parent 6f08d02 commit f98a145
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/hexagon/hexagon_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ static void hexagon_common_init(MachineState *machine, Rev_t rev,

if (i == 0) {
hexagon_init_bootstrap(machine, cpu);
if (!qdev_realize_and_unref(DEVICE(cpu), NULL, errp)) {
return;
}
DeviceState *l2vic_dev;
l2vic_dev = sysbus_create_varargs("l2vic", m_cfg->l2vic_base,
/* IRQ#, Evnt#,CauseCode */
Expand All @@ -139,8 +142,7 @@ static void hexagon_common_init(MachineState *machine, Rev_t rev,
sysbus_mmio_map(SYS_BUS_DEVICE(l2vic_dev), 1,
m_cfg->cfgtable.fastl2vic_base << 16);
}

if (!qdev_realize_and_unref(DEVICE(cpu), NULL, errp)) {
else if (!qdev_realize_and_unref(DEVICE(cpu), NULL, errp)) {
return;
}

Expand Down

0 comments on commit f98a145

Please sign in to comment.