cpumask: introduce new API, without changing anything, v3

Impact: cleanup

Clean up based on feedback from Andrew Morton and others:

 - change to inline functions instead of macros
 - add __init to bootmem method
 - add a missing debug check

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Rusty Russell
2008-11-08 20:24:19 +11:00
committed by Ingo Molnar
parent cd83e42c6b
commit 984f2f377f
2 changed files with 54 additions and 7 deletions

View File

@ -67,6 +67,7 @@ int cpumask_any_but(const struct cpumask *mask, unsigned int cpu)
{
unsigned int i;
cpumask_check(cpu);
for_each_cpu(i, mask)
if (i != cpu)
break;
@ -108,7 +109,7 @@ void free_cpumask_var(cpumask_var_t mask)
}
EXPORT_SYMBOL(free_cpumask_var);
void free_bootmem_cpumask_var(cpumask_var_t mask)
void __init free_bootmem_cpumask_var(cpumask_var_t mask)
{
free_bootmem((unsigned long)mask, cpumask_size());
}