summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2013-05-28 18:16:24 +0100
committerJon Medhurst <tixy@linaro.org>2013-06-03 11:19:33 +0100
commitb824ccf16727302f49f6431ebb765f85994e4806 (patch)
treef9395074b58cbf1a7d3dc8efc40e647787c2823c
parente7ffc4ae29b9ecf495e14988c7c595d2fc51fea1 (diff)
When booting on boards without a device-tree the function calc_first_cluster_size will find no cpu nodes and then call BUG_ON(). Prevent this by bailing out early if we don't have a device-tree. It is assumed that any system with an active IKS will be device-tree based so this change won't affect these. Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--drivers/gator/gator_iks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gator/gator_iks.c b/drivers/gator/gator_iks.c
index 6f45c5482058..8f687ca21583 100644
--- a/drivers/gator/gator_iks.c
+++ b/drivers/gator/gator_iks.c
@@ -27,6 +27,9 @@ static void calc_first_cluster_size(void)
// Zero is a valid cpuid, so initialize the array to 0xff's
memset(&mpidr_cpuids, 0xff, sizeof(mpidr_cpuids));
+ if (!of_have_populated_dt())
+ return;
+
while ((cn = of_find_node_by_type(cn, "cpu"))) {
BUG_ON(mpidr_cpuids_count >= NR_CPUS);