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.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 4f7a63237471..a2c819d3c96e 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -9,6 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/threads.h> 10#include <linux/threads.h>
11#include <linux/bitmap.h> 11#include <linux/bitmap.h>
12#include <linux/bug.h>
12 13
13typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; 14typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
14 15
@@ -763,12 +764,6 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
763 * 764 *
764 */ 765 */
765#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS 766#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
766/* These strip const, as traditionally they weren't const. */
767#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask)
768#define cpu_online_map (*(cpumask_t *)cpu_online_mask)
769#define cpu_present_map (*(cpumask_t *)cpu_present_mask)
770#define cpu_active_map (*(cpumask_t *)cpu_active_mask)
771
772#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) 767#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
773 768
774#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) 769#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
@@ -809,11 +804,10 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
809#else /* NR_CPUS > 1 */ 804#else /* NR_CPUS > 1 */
810int __first_cpu(const cpumask_t *srcp); 805int __first_cpu(const cpumask_t *srcp);
811int __next_cpu(int n, const cpumask_t *srcp); 806int __next_cpu(int n, const cpumask_t *srcp);
812int __any_online_cpu(const cpumask_t *mask);
813 807
814#define first_cpu(src) __first_cpu(&(src)) 808#define first_cpu(src) __first_cpu(&(src))
815#define next_cpu(n, src) __next_cpu((n), &(src)) 809#define next_cpu(n, src) __next_cpu((n), &(src))
816#define any_online_cpu(mask) __any_online_cpu(&(mask)) 810#define any_online_cpu(mask) cpumask_any_and(&mask, cpu_online_mask)
817#define for_each_cpu_mask(cpu, mask) \ 811#define for_each_cpu_mask(cpu, mask) \
818 for ((cpu) = -1; \ 812 for ((cpu) = -1; \
819 (cpu) = next_cpu((cpu), (mask)), \ 813 (cpu) = next_cpu((cpu), (mask)), \