diff options
author | Michael Davidsaver | 2017-01-27 16:20:22 +0100 |
---|---|---|
committer | Peter Maydell | 2017-01-27 16:29:08 +0100 |
commit | d713ea6c464918f87d1dd480520dd4aedb685d9a (patch) | |
tree | afb9f69a6d4bcbf654a0b7c482659a7070745eae /target/arm/cpu.h | |
parent | target/arm: Drop IS_M() macro (diff) | |
download | qemu-d713ea6c464918f87d1dd480520dd4aedb685d9a.tar.gz qemu-d713ea6c464918f87d1dd480520dd4aedb685d9a.tar.xz qemu-d713ea6c464918f87d1dd480520dd4aedb685d9a.zip |
armv7m_nvic: keep a pointer to the CPU
Many NVIC operations access the CPU state, so store a pointer in
struct nvic_state rather than fetching it via qemu_get_cpu() every
time we need it.
As with the arm_gicv3_common code, we currently just call
qemu_get_cpu() in the NVIC's realize method, but in future we might
want to use a QOM property to pass the CPU to the NVIC.
This imposes an ordering requirement that the CPU is
realized before the NVIC, but that is always true since
both are dealt with in armv7m_init().
Signed-off-by: Michael Davidsaver <mdavidsaver@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1485285380-10565-3-git-send-email-peter.maydell@linaro.org
[PMM: Use qemu_get_cpu(0) rather than first_cpu; expand
commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
0 files changed, 0 insertions, 0 deletions