diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpumask.h | 53 |
1 files changed, 7 insertions, 46 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index e62a67156c53..7c178a6baae3 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -1057,50 +1057,11 @@ extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS); | |||
1057 | #define for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask) | 1057 | #define for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask) |
1058 | 1058 | ||
1059 | /* Wrappers for arch boot code to manipulate normally-constant masks */ | 1059 | /* Wrappers for arch boot code to manipulate normally-constant masks */ |
1060 | static inline void set_cpu_possible(unsigned int cpu, bool possible) | 1060 | void set_cpu_possible(unsigned int cpu, bool possible); |
1061 | { | 1061 | void set_cpu_present(unsigned int cpu, bool present); |
1062 | if (possible) | 1062 | void set_cpu_online(unsigned int cpu, bool online); |
1063 | cpumask_set_cpu(cpu, &cpu_possible_map); | 1063 | void set_cpu_active(unsigned int cpu, bool active); |
1064 | else | 1064 | void init_cpu_present(const struct cpumask *src); |
1065 | cpumask_clear_cpu(cpu, &cpu_possible_map); | 1065 | void init_cpu_possible(const struct cpumask *src); |
1066 | } | 1066 | void init_cpu_online(const struct cpumask *src); |
1067 | |||
1068 | static inline void set_cpu_present(unsigned int cpu, bool present) | ||
1069 | { | ||
1070 | if (present) | ||
1071 | cpumask_set_cpu(cpu, &cpu_present_map); | ||
1072 | else | ||
1073 | cpumask_clear_cpu(cpu, &cpu_present_map); | ||
1074 | } | ||
1075 | |||
1076 | static inline void set_cpu_online(unsigned int cpu, bool online) | ||
1077 | { | ||
1078 | if (online) | ||
1079 | cpumask_set_cpu(cpu, &cpu_online_map); | ||
1080 | else | ||
1081 | cpumask_clear_cpu(cpu, &cpu_online_map); | ||
1082 | } | ||
1083 | |||
1084 | static inline void set_cpu_active(unsigned int cpu, bool active) | ||
1085 | { | ||
1086 | if (active) | ||
1087 | cpumask_set_cpu(cpu, &cpu_active_map); | ||
1088 | else | ||
1089 | cpumask_clear_cpu(cpu, &cpu_active_map); | ||
1090 | } | ||
1091 | |||
1092 | static inline void init_cpu_present(const struct cpumask *src) | ||
1093 | { | ||
1094 | cpumask_copy(&cpu_present_map, src); | ||
1095 | } | ||
1096 | |||
1097 | static inline void init_cpu_possible(const struct cpumask *src) | ||
1098 | { | ||
1099 | cpumask_copy(&cpu_possible_map, src); | ||
1100 | } | ||
1101 | |||
1102 | static inline void init_cpu_online(const struct cpumask *src) | ||
1103 | { | ||
1104 | cpumask_copy(&cpu_online_map, src); | ||
1105 | } | ||
1106 | #endif /* __LINUX_CPUMASK_H */ | 1067 | #endif /* __LINUX_CPUMASK_H */ |