aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index c8e66619097b..31caa1bc620a 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -894,6 +894,12 @@ static inline void cpumask_copy(struct cpumask *dstp,
894#define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2)) 894#define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2))
895 895
896/** 896/**
897 * cpumask_of - the cpumask containing just a given cpu
898 * @cpu: the cpu (<= nr_cpu_ids)
899 */
900#define cpumask_of(cpu) (get_cpu_mask(cpu))
901
902/**
897 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * 903 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
898 * @bitmap: the bitmap 904 * @bitmap: the bitmap
899 * 905 *
@@ -946,6 +952,7 @@ typedef struct cpumask *cpumask_var_t;
946bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); 952bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags);
947void alloc_bootmem_cpumask_var(cpumask_var_t *mask); 953void alloc_bootmem_cpumask_var(cpumask_var_t *mask);
948void free_cpumask_var(cpumask_var_t mask); 954void free_cpumask_var(cpumask_var_t mask);
955void free_bootmem_cpumask_var(cpumask_var_t mask);
949 956
950#else 957#else
951typedef struct cpumask cpumask_var_t[1]; 958typedef struct cpumask cpumask_var_t[1];
@@ -962,6 +969,10 @@ static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
962static inline void free_cpumask_var(cpumask_var_t mask) 969static inline void free_cpumask_var(cpumask_var_t mask)
963{ 970{
964} 971}
972
973static inline void free_bootmem_cpumask_var(cpumask_var_t mask)
974{
975}
965#endif /* CONFIG_CPUMASK_OFFSTACK */ 976#endif /* CONFIG_CPUMASK_OFFSTACK */
966 977
967/* The pointer versions of the maps, these will become the primary versions. */ 978/* The pointer versions of the maps, these will become the primary versions. */