armv7m_nvic: Use qemu_get_cpu(0) instead of current_cpu
commita19861666b574f54c71d1fea9a8d8a84915dfa70
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Mon, 4 Jul 2016 12:06:35 +0000 (4 13:06 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Jul 2016 12:15:22 +0000 (4 13:15 +0100)
tree4a3d6fc5d9bb3f7a4b55b15ee4cfb81625dc6ed9
parent39e0b03dec518254fabd2acff29548d3f1d2b754
armv7m_nvic: Use qemu_get_cpu(0) instead of current_cpu

Starting QEMU with -S results in current_cpu containing its initial
value of NULL. It is however possible to connect to such QEMU instance
and query various CPU registers, one example being CPUID, and doing that
results in QEMU segfaulting.

Using qemu_get_cpu(0) seem reasonable enough given that ARMv7M
architecture is a single core architecture.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/intc/armv7m_nvic.c