qemu/hw/misc
Peter Maydell 5e2fb7c598 hw/misc/imx6_src: Don't crash trying to reset missing CPUs
Commit 4881658a4b introduced a call to arm_get_cpu_by_id(),
and Coverity noticed that we weren't checking that it didn't
return NULL (CID 1371652).

Normally this won't happen (because all 4 CPUs are expected
to exist), but it's possible the user requested fewer CPUs
on the command line. Handle this possibility by silently
doing nothing, which is the same behaviour as before commit
4881658a4b and also how we handle the other CPU operations
(since we ignore the INVALID_PARAM returns from arm_set_cpu_on()
and friends).

There is a slight behavioural difference to the pre-4881658a4b
situation: the "reset this core" bit will remain set rather
than not being permitted to be set. The imx6 datasheet is
unclear about the behaviour in this odd corner case, so we
opt for the simpler code rather than complicated logic to
maintain identical behaviour.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1488542374-1256-1-git-send-email-peter.maydell@linaro.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2017-03-14 16:13:22 +00:00
..
macio
a9scu.c
applesmc.c
arm11scu.c
arm_integrator_debug.c
arm_l2x0.c
arm_sysctl.c
aspeed_scu.c
aspeed_sdmc.c
auxbus.c
bcm2835_mbox.c
bcm2835_property.c
bcm2835_rng.c bcm2835_rng: Use qcrypto_random_bytes() rather than rand() 2017-02-28 12:08:14 +00:00
cbus.c
debugexit.c
eccmemctl.c
edu.c
exynos4210_clk.c hw/arm/exynos: Fix Linux kernel division by zero for PLLs 2017-02-28 12:08:20 +00:00
exynos4210_pmu.c
hyperv_testdev.c
imx6_ccm.c
imx6_src.c hw/misc/imx6_src: Don't crash trying to reset missing CPUs 2017-03-14 16:13:22 +00:00
imx25_ccm.c
imx31_ccm.c
imx_ccm.c
ivshmem.c
Makefile.objs hw/arm/exynos: Fix Linux kernel division by zero for PLLs 2017-02-28 12:08:20 +00:00
max111x.c
milkymist-hpdmc.c
milkymist-pfpu.c
mips_cmgcr.c
mips_cpc.c
mips_itu.c
mst_fpga.c
omap_clk.c
omap_gpmc.c
omap_l4.c
omap_sdrc.c
omap_tap.c
pc-testdev.c
pci-testdev.c
puv3_pm.c
pvpanic.c
sga.c
slavio_misc.c
stm32f2xx_syscfg.c
tmp105.c
tmp105.h
trace-events
unimp.c
vmport.c
zynq-xadc.c
zynq_slcr.c