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

Skip to content
Commit e1f5ad72 authored by Ke Wang's avatar Ke Wang Committed by Todd Kjos
Browse files

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: default avatarKe Wang <ke.wang@spreadtrum.com>
parent ca20dbf4
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