Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6a3e2d3 authored by Lingutla Chandrasekhar's avatar Lingutla Chandrasekhar
Browse files

sched: walt: fix sched_cluster initialization



If cluster topology parsing failed or system booted with single cpu,
then topology possible sibling mask could be empty. This leads to
initialization of sched_clusters with empty cpus and there are many
call sites, which use the cluster cpu mask without checking for empty mask.
They lead to accessing invalid cpus ( minus one) leading to crashes.
Fix it by resetting to an initial cluster structure that has all possible
cpus as cluster mask. Also, warn when an empty cluster is detected.

To continue using init_cluster on device tree failures:
- Use init_cluster as default entry in cluster_head, and once
  cluster topology parsed successfully, cluster_head gets updated with
  proper cpu cluster information.
- If cluster topology parsing failed, free allocated sched_clusters and
  make sure rq points to init_cluster instead of invalid address.
- Remove unused cluster id bitmaps.

Change-Id: Ic65ba86ff90a271098fb593221d1679d634930b1
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 3654d89f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment