gator: Prevent BUG() when no device-tree cpu nodes present.
authorJon Medhurst <tixy@linaro.org>
Mon, 17 Jun 2013 09:15:08 +0000 (10:15 +0100)
committerJon Medhurst <tixy@linaro.org>
Tue, 8 Oct 2013 13:57:44 +0000 (14:57 +0100)
commit9c68b19be568a84c9bbd88e6a7a9627d6a81a0c4
tree3340ed9dd786c3c3fb23c1ee15b9662b37d6b782
parent19733137e499937be78facf0aa2c204f60297d59
gator: Prevent BUG() when no device-tree cpu nodes present.

When IKS support is enabled in gator but we are running on boards
without a device-tree or where there are no cpu nodes in the
device-tree, then calc_first_cluster_size will call BUG_ON() because
mpidr_cpuids_count == 0.

To work around this, we will instead set a flag to indicate we haven't
managed to create an mpidr table and fallback to the behaviour we would
have if IKS wasn't enabled. This means that IKS support will only
function as expected if there are device-tree nodes for CPUs but we
expect that to always be the case anyway.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
drivers/gator/gator_iks.c