diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-05-28 18:16:24 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-06-03 11:19:33 +0100 |
commit | b824ccf16727302f49f6431ebb765f85994e4806 (patch) | |
tree | f9395074b58cbf1a7d3dc8efc40e647787c2823c | |
parent | e7ffc4ae29b9ecf495e14988c7c595d2fc51fea1 (diff) |
gator: Prevent BUG() when no device-tree is present.tracking-gator-llct-20130606.0tracking-gator-llct-20130604.1tracking-gator-llct-20130604.0
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.c | 3 |
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); |