diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-05-28 18:16:24 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-06-10 09:57:51 +0100 |
commit | 882503738c0cbef28da55b511913c0c603016e26 (patch) | |
tree | 083e3c9d297e43cb45a6856a6811bcb993bfcba3 | |
parent | b3a53661af871deeeda00421cc8d5fcb58548488 (diff) |
gator: Prevent BUG() when no device-tree is present.tracking-gator-llct-20130610.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); |