mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] cpumask: uninline any_online_cpu()
text data bss dec hex filename before: 3605597 1363528 363328 5332453 515de5 vmlinux after: 3605295 1363612 363200 5332107 515c8b vmlinux 218 bytes saved. Also, optimise any_online_cpu() out of existence on CONFIG_SMP=n. This function seems inefficient. Can't we simply AND the two masks, then use find_first_bit()? Cc: Paul Jackson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8630282070
commit
96a9b4d31e
2 changed files with 15 additions and 10 deletions
|
|
@ -31,3 +31,15 @@ int highest_possible_processor_id(void)
|
|||
return highest;
|
||||
}
|
||||
EXPORT_SYMBOL(highest_possible_processor_id);
|
||||
|
||||
int __any_online_cpu(const cpumask_t *mask)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_cpu_mask(cpu, *mask) {
|
||||
if (cpu_online(cpu))
|
||||
break;
|
||||
}
|
||||
return cpu;
|
||||
}
|
||||
EXPORT_SYMBOL(__any_online_cpu);
|
||||
|
|
|
|||
Loading…
Reference in a new issue