diff options
Diffstat (limited to 'lib/cpumask.c')
| -rw-r--r-- | lib/cpumask.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 8d666ab84b5c..0cb672eb107c 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -5,6 +5,7 @@  #include <linux/cpumask.h>  #include <linux/export.h>  #include <linux/memblock.h> +#include <linux/numa.h>  /**   * cpumask_next - get the next cpu in a cpumask @@ -164,6 +165,9 @@ EXPORT_SYMBOL(zalloc_cpumask_var);  void __init alloc_bootmem_cpumask_var(cpumask_var_t *mask)  {  	*mask = memblock_alloc(cpumask_size(), SMP_CACHE_BYTES); +	if (!*mask) +		panic("%s: Failed to allocate %u bytes\n", __func__, +		      cpumask_size());  }  /** @@ -206,7 +210,7 @@ unsigned int cpumask_local_spread(unsigned int i, int node)  	/* Wrap: we always want a cpu. */  	i %= num_online_cpus(); -	if (node == -1) { +	if (node == NUMA_NO_NODE) {  		for_each_cpu(cpu, cpu_online_mask)  			if (i-- == 0)  				return cpu;  |