ANDROID: sched: Fix share_cap_level detect
share_cap will not be set correctly in the following system:
1. Only 1 cpu is in one cluster initially of a multi cluster system.
2. The number of the only 1 cpu cluster is the last one.
For example,
DIE       [  0      1      2      3]
MC        [  0      1      2] [   3]
CPU:         0      1      2      3
arm:        A53    A53    A53    A57
The thread sibling of cpu3 in the example above is equal to the
related_cpus of cpu3's cpufreq policy. The share_cap_level is set
as share_cap_core in the loop of cpu0/cpu1/cpu2, but be reset to
share_cap_thread in the loop of cpu3 and SD_SHARE_CAP_STATES will
also be missed on MC domain.
In summary, ensure that if at least one cluster needs the
SD_SHARE_CAP_STATES flag, others won't clear it.
Bug: 120440300
Change-Id: If26a72663fb645eb4ac05baeb9ed8bdf7c89ca04
Signed-off-by:  Ke Wang <ke.wang@spreadtrum.com>
Ke Wang <ke.wang@spreadtrum.com>
Loading
Please register or sign in to comment
