On 4/27/21 12:26 PM, Philippe Mathieu-Daudé wrote:
When building without the leon3 machine, we get this link failure:
/usr/bin/ld: target_sparc_int32_helper.c.o: in function `leon3_irq_manager':
target/sparc/int32_helper.c:172: undefined reference to `leon3_irq_ack'
This is because the leon3_irq_ack() is declared in hw/sparc/leon3.c,
which is only build when CONFIG_LEON3 is selected.
Fix by moving the leon3_cache_control_int() / leon3_irq_manager()
(which are specific to the leon3 machine) to hw/sparc/leon3.c.
Move the trace events along (but don't rename them).
leon3_irq_ack() is now locally used, declare it static to reduce
its scope.
Signed-off-by: Philippe Mathieu-Daudé<f4...@amsat.org>
---
RFC: The problem is we have hardware specific code in the
architectural translation code. I wish there was a better
alternative rather than moving this code to hw/sparc/.
---
This one seems dead obvious. I think this code should have been in
hw/sparc/leon3.c to begin with.
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~