mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
MIPS: Unify checks for sibling CPUs
Up until now we have open-coded checks for whether CPUs are siblings, with slight variations on whether we consider the package ID or not. This will only get more complex when we introduce cluster support, so in preparation for that this patch introduces a cpus_are_siblings() function which can be used to check whether or not 2 CPUs are siblings in a consistent manner. By checking globalnumber with the VP ID masked out this also has the neat side effect of being ready for multi-cluster systems already. Signed-off-by: Paul Burton <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/17011/ Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
parent
856fbcee60
commit
fe7a38c625
5 changed files with 28 additions and 13 deletions
|
|
@ -37,7 +37,7 @@ static int cps_nc_enter(struct cpuidle_device *dev,
|
|||
* TODO: don't treat core 0 specially, just prevent the final core
|
||||
* TODO: remap interrupt affinity temporarily
|
||||
*/
|
||||
if (!cpu_core(&cpu_data[dev->cpu]) && (index > STATE_NC_WAIT))
|
||||
if (cpus_are_siblings(0, dev->cpu) && (index > STATE_NC_WAIT))
|
||||
index = STATE_NC_WAIT;
|
||||
|
||||
/* Select the appropriate cps_pm_state */
|
||||
|
|
|
|||
Loading…
Reference in a new issue