337 #define CPUMASK_ALLOC(m) struct m _m, *m = &_m |
359 #define CPUMASK_ALLOC(m) struct m _m, *m = &_m |
338 #define CPUMASK_FREE(m) |
360 #define CPUMASK_FREE(m) |
339 #endif |
361 #endif |
340 #define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v) |
362 #define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v) |
341 |
363 |
342 #define cpumask_scnprintf(buf, len, src) \ |
|
343 __cpumask_scnprintf((buf), (len), &(src), NR_CPUS) |
|
344 static inline int __cpumask_scnprintf(char *buf, int len, |
|
345 const cpumask_t *srcp, int nbits) |
|
346 { |
|
347 return bitmap_scnprintf(buf, len, srcp->bits, nbits); |
|
348 } |
|
349 |
|
350 #define cpumask_parse_user(ubuf, ulen, dst) \ |
|
351 __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS) |
|
352 static inline int __cpumask_parse_user(const char __user *buf, int len, |
|
353 cpumask_t *dstp, int nbits) |
|
354 { |
|
355 return bitmap_parse_user(buf, len, dstp->bits, nbits); |
|
356 } |
|
357 |
|
358 #define cpulist_scnprintf(buf, len, src) \ |
|
359 __cpulist_scnprintf((buf), (len), &(src), NR_CPUS) |
|
360 static inline int __cpulist_scnprintf(char *buf, int len, |
|
361 const cpumask_t *srcp, int nbits) |
|
362 { |
|
363 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); |
|
364 } |
|
365 |
|
366 #define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS) |
|
367 static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits) |
|
368 { |
|
369 return bitmap_parselist(buf, dstp->bits, nbits); |
|
370 } |
|
371 |
|
372 #define cpu_remap(oldbit, old, new) \ |
364 #define cpu_remap(oldbit, old, new) \ |
373 __cpu_remap((oldbit), &(old), &(new), NR_CPUS) |
365 __cpu_remap((oldbit), &(old), &(new), NR_CPUS) |
374 static inline int __cpu_remap(int oldbit, |
366 static inline int __cpu_remap(int oldbit, |
375 const cpumask_t *oldp, const cpumask_t *newp, int nbits) |
367 const cpumask_t *oldp, const cpumask_t *newp, int nbits) |
376 { |
368 { |
398 static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, |
390 static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, |
399 int sz, int nbits) |
391 int sz, int nbits) |
400 { |
392 { |
401 bitmap_fold(dstp->bits, origp->bits, sz, nbits); |
393 bitmap_fold(dstp->bits, origp->bits, sz, nbits); |
402 } |
394 } |
|
395 #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ |
403 |
396 |
404 #if NR_CPUS == 1 |
397 #if NR_CPUS == 1 |
405 |
398 |
406 #define nr_cpu_ids 1 |
399 #define nr_cpu_ids 1 |
|
400 #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS |
407 #define first_cpu(src) ({ (void)(src); 0; }) |
401 #define first_cpu(src) ({ (void)(src); 0; }) |
408 #define next_cpu(n, src) ({ (void)(src); 1; }) |
402 #define next_cpu(n, src) ({ (void)(src); 1; }) |
409 #define any_online_cpu(mask) 0 |
403 #define any_online_cpu(mask) 0 |
410 #define for_each_cpu_mask(cpu, mask) \ |
404 #define for_each_cpu_mask(cpu, mask) \ |
411 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) |
405 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) |
412 |
406 #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ |
413 #else /* NR_CPUS > 1 */ |
407 #else /* NR_CPUS > 1 */ |
414 |
408 |
415 extern int nr_cpu_ids; |
409 extern int nr_cpu_ids; |
|
410 #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS |
416 int __first_cpu(const cpumask_t *srcp); |
411 int __first_cpu(const cpumask_t *srcp); |
417 int __next_cpu(int n, const cpumask_t *srcp); |
412 int __next_cpu(int n, const cpumask_t *srcp); |
418 int __any_online_cpu(const cpumask_t *mask); |
413 int __any_online_cpu(const cpumask_t *mask); |
419 |
414 |
420 #define first_cpu(src) __first_cpu(&(src)) |
415 #define first_cpu(src) __first_cpu(&(src)) |
441 for ((cpu) = -1; \ |
438 for ((cpu) = -1; \ |
442 (cpu) = next_cpu_nr((cpu), (mask)), \ |
439 (cpu) = next_cpu_nr((cpu), (mask)), \ |
443 (cpu) < nr_cpu_ids; ) |
440 (cpu) < nr_cpu_ids; ) |
444 |
441 |
445 #endif /* NR_CPUS > 64 */ |
442 #endif /* NR_CPUS > 64 */ |
|
443 #endif /* !CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS */ |
446 |
444 |
447 /* |
445 /* |
448 * The following particular system cpumasks and operations manage |
446 * The following particular system cpumasks and operations manage |
449 * possible, present, active and online cpus. Each of them is a fixed size |
447 * possible, present, active and online cpus. |
450 * bitmap of size NR_CPUS. |
448 * |
451 * |
449 * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable |
452 * #ifdef CONFIG_HOTPLUG_CPU |
450 * cpu_present_mask - has bit 'cpu' set iff cpu is populated |
453 * cpu_possible_map - has bit 'cpu' set iff cpu is populatable |
451 * cpu_online_mask - has bit 'cpu' set iff cpu available to scheduler |
454 * cpu_present_map - has bit 'cpu' set iff cpu is populated |
452 * cpu_active_mask - has bit 'cpu' set iff cpu available to migration |
455 * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
453 * |
456 * cpu_active_map - has bit 'cpu' set iff cpu available to migration |
454 * If !CONFIG_HOTPLUG_CPU, present == possible, and active == online. |
457 * #else |
455 * |
458 * cpu_possible_map - has bit 'cpu' set iff cpu is populated |
456 * The cpu_possible_mask is fixed at boot time, as the set of CPU id's |
459 * cpu_present_map - copy of cpu_possible_map |
457 * that it is possible might ever be plugged in at anytime during the |
460 * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
458 * life of that system boot. The cpu_present_mask is dynamic(*), |
461 * #endif |
459 * representing which CPUs are currently plugged in. And |
462 * |
460 * cpu_online_mask is the dynamic subset of cpu_present_mask, |
463 * In either case, NR_CPUS is fixed at compile time, as the static |
461 * indicating those CPUs available for scheduling. |
464 * size of these bitmaps. The cpu_possible_map is fixed at boot |
462 * |
465 * time, as the set of CPU id's that it is possible might ever |
463 * If HOTPLUG is enabled, then cpu_possible_mask is forced to have |
466 * be plugged in at anytime during the life of that system boot. |
|
467 * The cpu_present_map is dynamic(*), representing which CPUs |
|
468 * are currently plugged in. And cpu_online_map is the dynamic |
|
469 * subset of cpu_present_map, indicating those CPUs available |
|
470 * for scheduling. |
|
471 * |
|
472 * If HOTPLUG is enabled, then cpu_possible_map is forced to have |
|
473 * all NR_CPUS bits set, otherwise it is just the set of CPUs that |
464 * all NR_CPUS bits set, otherwise it is just the set of CPUs that |
474 * ACPI reports present at boot. |
465 * ACPI reports present at boot. |
475 * |
466 * |
476 * If HOTPLUG is enabled, then cpu_present_map varies dynamically, |
467 * If HOTPLUG is enabled, then cpu_present_mask varies dynamically, |
477 * depending on what ACPI reports as currently plugged in, otherwise |
468 * depending on what ACPI reports as currently plugged in, otherwise |
478 * cpu_present_map is just a copy of cpu_possible_map. |
469 * cpu_present_mask is just a copy of cpu_possible_mask. |
479 * |
470 * |
480 * (*) Well, cpu_present_map is dynamic in the hotplug case. If not |
471 * (*) Well, cpu_present_mask is dynamic in the hotplug case. If not |
481 * hotplug, it's a copy of cpu_possible_map, hence fixed at boot. |
472 * hotplug, it's a copy of cpu_possible_mask, hence fixed at boot. |
482 * |
473 * |
483 * Subtleties: |
474 * Subtleties: |
484 * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode |
475 * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode |
485 * assumption that their single CPU is online. The UP |
476 * assumption that their single CPU is online. The UP |
486 * cpu_{online,possible,present}_maps are placebos. Changing them |
477 * cpu_{online,possible,present}_masks are placebos. Changing them |
487 * will have no useful affect on the following num_*_cpus() |
478 * will have no useful affect on the following num_*_cpus() |
488 * and cpu_*() macros in the UP case. This ugliness is a UP |
479 * and cpu_*() macros in the UP case. This ugliness is a UP |
489 * optimization - don't waste any instructions or memory references |
480 * optimization - don't waste any instructions or memory references |
490 * asking if you're online or how many CPUs there are if there is |
481 * asking if you're online or how many CPUs there are if there is |
491 * only one CPU. |
482 * only one CPU. |
492 * 2) Most SMP arch's #define some of these maps to be some |
483 */ |
493 * other map specific to that arch. Therefore, the following |
484 |
494 * must be #define macros, not inlines. To see why, examine |
485 extern const struct cpumask *const cpu_possible_mask; |
495 * the assembly code produced by the following. Note that |
486 extern const struct cpumask *const cpu_online_mask; |
496 * set1() writes phys_x_map, but set2() writes x_map: |
487 extern const struct cpumask *const cpu_present_mask; |
497 * int x_map, phys_x_map; |
488 extern const struct cpumask *const cpu_active_mask; |
498 * #define set1(a) x_map = a |
489 |
499 * inline void set2(int a) { x_map = a; } |
490 /* These strip const, as traditionally they weren't const. */ |
500 * #define x_map phys_x_map |
491 #define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) |
501 * main(){ set1(3); set2(5); } |
492 #define cpu_online_map (*(cpumask_t *)cpu_online_mask) |
502 */ |
493 #define cpu_present_map (*(cpumask_t *)cpu_present_mask) |
503 |
494 #define cpu_active_map (*(cpumask_t *)cpu_active_mask) |
504 extern cpumask_t cpu_possible_map; |
|
505 extern cpumask_t cpu_online_map; |
|
506 extern cpumask_t cpu_present_map; |
|
507 extern cpumask_t cpu_active_map; |
|
508 |
495 |
509 #if NR_CPUS > 1 |
496 #if NR_CPUS > 1 |
510 #define num_online_cpus() cpus_weight_nr(cpu_online_map) |
497 #define num_online_cpus() cpumask_weight(cpu_online_mask) |
511 #define num_possible_cpus() cpus_weight_nr(cpu_possible_map) |
498 #define num_possible_cpus() cpumask_weight(cpu_possible_mask) |
512 #define num_present_cpus() cpus_weight_nr(cpu_present_map) |
499 #define num_present_cpus() cpumask_weight(cpu_present_mask) |
513 #define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) |
500 #define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask) |
514 #define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) |
501 #define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask) |
515 #define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) |
502 #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) |
516 #define cpu_active(cpu) cpu_isset((cpu), cpu_active_map) |
503 #define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask) |
517 #else |
504 #else |
518 #define num_online_cpus() 1 |
505 #define num_online_cpus() 1 |
519 #define num_possible_cpus() 1 |
506 #define num_possible_cpus() 1 |
520 #define num_present_cpus() 1 |
507 #define num_present_cpus() 1 |
521 #define cpu_online(cpu) ((cpu) == 0) |
508 #define cpu_online(cpu) ((cpu) == 0) |
524 #define cpu_active(cpu) ((cpu) == 0) |
511 #define cpu_active(cpu) ((cpu) == 0) |
525 #endif |
512 #endif |
526 |
513 |
527 #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
514 #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
528 |
515 |
529 #define for_each_possible_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_possible_map) |
|
530 #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) |
|
531 #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) |
|
532 |
|
533 /* These are the new versions of the cpumask operators: passed by pointer. |
516 /* These are the new versions of the cpumask operators: passed by pointer. |
534 * The older versions will be implemented in terms of these, then deleted. */ |
517 * The older versions will be implemented in terms of these, then deleted. */ |
535 #define cpumask_bits(maskp) ((maskp)->bits) |
518 #define cpumask_bits(maskp) ((maskp)->bits) |
536 |
519 |
537 #if NR_CPUS <= BITS_PER_LONG |
520 #if NR_CPUS <= BITS_PER_LONG |
538 #define CPU_BITS_ALL \ |
521 #define CPU_BITS_ALL \ |
539 { \ |
522 { \ |
540 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
523 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
541 } |
524 } |
542 |
525 |
543 /* This produces more efficient code. */ |
|
544 #define nr_cpumask_bits NR_CPUS |
|
545 |
|
546 #else /* NR_CPUS > BITS_PER_LONG */ |
526 #else /* NR_CPUS > BITS_PER_LONG */ |
547 |
527 |
548 #define CPU_BITS_ALL \ |
528 #define CPU_BITS_ALL \ |
549 { \ |
529 { \ |
550 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ |
530 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ |
551 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
531 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ |
552 } |
532 } |
553 |
533 #endif /* NR_CPUS > BITS_PER_LONG */ |
|
534 |
|
535 #ifdef CONFIG_CPUMASK_OFFSTACK |
|
536 /* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also, |
|
537 * not all bits may be allocated. */ |
554 #define nr_cpumask_bits nr_cpu_ids |
538 #define nr_cpumask_bits nr_cpu_ids |
555 #endif /* NR_CPUS > BITS_PER_LONG */ |
539 #else |
|
540 #define nr_cpumask_bits NR_CPUS |
|
541 #endif |
556 |
542 |
557 /* verify cpu argument to cpumask_* operators */ |
543 /* verify cpu argument to cpumask_* operators */ |
558 static inline unsigned int cpumask_check(unsigned int cpu) |
544 static inline unsigned int cpumask_check(unsigned int cpu) |
559 { |
545 { |
560 #ifdef CONFIG_DEBUG_PER_CPU_MAPS |
546 #ifdef CONFIG_DEBUG_PER_CPU_MAPS |
944 * @cpu: the cpu (<= nr_cpu_ids) |
930 * @cpu: the cpu (<= nr_cpu_ids) |
945 */ |
931 */ |
946 #define cpumask_of(cpu) (get_cpu_mask(cpu)) |
932 #define cpumask_of(cpu) (get_cpu_mask(cpu)) |
947 |
933 |
948 /** |
934 /** |
949 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * |
935 * cpumask_scnprintf - print a cpumask into a string as comma-separated hex |
950 * @bitmap: the bitmap |
936 * @buf: the buffer to sprintf into |
951 * |
937 * @len: the length of the buffer |
952 * There are a few places where cpumask_var_t isn't appropriate and |
938 * @srcp: the cpumask to print |
953 * static cpumasks must be used (eg. very early boot), yet we don't |
939 * |
954 * expose the definition of 'struct cpumask'. |
940 * If len is zero, returns zero. Otherwise returns the length of the |
955 * |
941 * (nul-terminated) @buf string. |
956 * This does the conversion, and can be used as a constant initializer. |
942 */ |
957 */ |
943 static inline int cpumask_scnprintf(char *buf, int len, |
958 #define to_cpumask(bitmap) \ |
944 const struct cpumask *srcp) |
959 ((struct cpumask *)(1 ? (bitmap) \ |
945 { |
960 : (void *)sizeof(__check_is_bitmap(bitmap)))) |
946 return bitmap_scnprintf(buf, len, cpumask_bits(srcp), nr_cpumask_bits); |
961 |
947 } |
962 static inline int __check_is_bitmap(const unsigned long *bitmap) |
948 |
963 { |
949 /** |
964 return 1; |
950 * cpumask_parse_user - extract a cpumask from a user string |
|
951 * @buf: the buffer to extract from |
|
952 * @len: the length of the buffer |
|
953 * @dstp: the cpumask to set. |
|
954 * |
|
955 * Returns -errno, or 0 for success. |
|
956 */ |
|
957 static inline int cpumask_parse_user(const char __user *buf, int len, |
|
958 struct cpumask *dstp) |
|
959 { |
|
960 return bitmap_parse_user(buf, len, cpumask_bits(dstp), nr_cpumask_bits); |
|
961 } |
|
962 |
|
963 /** |
|
964 * cpulist_scnprintf - print a cpumask into a string as comma-separated list |
|
965 * @buf: the buffer to sprintf into |
|
966 * @len: the length of the buffer |
|
967 * @srcp: the cpumask to print |
|
968 * |
|
969 * If len is zero, returns zero. Otherwise returns the length of the |
|
970 * (nul-terminated) @buf string. |
|
971 */ |
|
972 static inline int cpulist_scnprintf(char *buf, int len, |
|
973 const struct cpumask *srcp) |
|
974 { |
|
975 return bitmap_scnlistprintf(buf, len, cpumask_bits(srcp), |
|
976 nr_cpumask_bits); |
|
977 } |
|
978 |
|
979 /** |
|
980 * cpulist_parse_user - extract a cpumask from a user string of ranges |
|
981 * @buf: the buffer to extract from |
|
982 * @len: the length of the buffer |
|
983 * @dstp: the cpumask to set. |
|
984 * |
|
985 * Returns -errno, or 0 for success. |
|
986 */ |
|
987 static inline int cpulist_parse(const char *buf, struct cpumask *dstp) |
|
988 { |
|
989 return bitmap_parselist(buf, cpumask_bits(dstp), nr_cpumask_bits); |
965 } |
990 } |
966 |
991 |
967 /** |
992 /** |
968 * cpumask_size - size to allocate for a 'struct cpumask' in bytes |
993 * cpumask_size - size to allocate for a 'struct cpumask' in bytes |
969 * |
994 * |
1018 |
1050 |
1019 static inline void free_bootmem_cpumask_var(cpumask_var_t mask) |
1051 static inline void free_bootmem_cpumask_var(cpumask_var_t mask) |
1020 { |
1052 { |
1021 } |
1053 } |
1022 #endif /* CONFIG_CPUMASK_OFFSTACK */ |
1054 #endif /* CONFIG_CPUMASK_OFFSTACK */ |
1023 |
|
1024 /* The pointer versions of the maps, these will become the primary versions. */ |
|
1025 #define cpu_possible_mask ((const struct cpumask *)&cpu_possible_map) |
|
1026 #define cpu_online_mask ((const struct cpumask *)&cpu_online_map) |
|
1027 #define cpu_present_mask ((const struct cpumask *)&cpu_present_map) |
|
1028 #define cpu_active_mask ((const struct cpumask *)&cpu_active_map) |
|
1029 |
1055 |
1030 /* It's common to want to use cpu_all_mask in struct member initializers, |
1056 /* It's common to want to use cpu_all_mask in struct member initializers, |
1031 * so it has to refer to an address rather than a pointer. */ |
1057 * so it has to refer to an address rather than a pointer. */ |
1032 extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS); |
1058 extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS); |
1033 #define cpu_all_mask to_cpumask(cpu_all_bits) |
1059 #define cpu_all_mask to_cpumask(cpu_all_bits) |
1034 |
1060 |
1035 /* First bits of cpu_bit_bitmap are in fact unset. */ |
1061 /* First bits of cpu_bit_bitmap are in fact unset. */ |
1036 #define cpu_none_mask to_cpumask(cpu_bit_bitmap[0]) |
1062 #define cpu_none_mask to_cpumask(cpu_bit_bitmap[0]) |
1037 |
1063 |
|
1064 #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask) |
|
1065 #define for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask) |
|
1066 #define for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask) |
|
1067 |
1038 /* Wrappers for arch boot code to manipulate normally-constant masks */ |
1068 /* Wrappers for arch boot code to manipulate normally-constant masks */ |
1039 static inline void set_cpu_possible(unsigned int cpu, bool possible) |
1069 void set_cpu_possible(unsigned int cpu, bool possible); |
1040 { |
1070 void set_cpu_present(unsigned int cpu, bool present); |
1041 if (possible) |
1071 void set_cpu_online(unsigned int cpu, bool online); |
1042 cpumask_set_cpu(cpu, &cpu_possible_map); |
1072 void set_cpu_active(unsigned int cpu, bool active); |
1043 else |
1073 void init_cpu_present(const struct cpumask *src); |
1044 cpumask_clear_cpu(cpu, &cpu_possible_map); |
1074 void init_cpu_possible(const struct cpumask *src); |
1045 } |
1075 void init_cpu_online(const struct cpumask *src); |
1046 |
|
1047 static inline void set_cpu_present(unsigned int cpu, bool present) |
|
1048 { |
|
1049 if (present) |
|
1050 cpumask_set_cpu(cpu, &cpu_present_map); |
|
1051 else |
|
1052 cpumask_clear_cpu(cpu, &cpu_present_map); |
|
1053 } |
|
1054 |
|
1055 static inline void set_cpu_online(unsigned int cpu, bool online) |
|
1056 { |
|
1057 if (online) |
|
1058 cpumask_set_cpu(cpu, &cpu_online_map); |
|
1059 else |
|
1060 cpumask_clear_cpu(cpu, &cpu_online_map); |
|
1061 } |
|
1062 |
|
1063 static inline void set_cpu_active(unsigned int cpu, bool active) |
|
1064 { |
|
1065 if (active) |
|
1066 cpumask_set_cpu(cpu, &cpu_active_map); |
|
1067 else |
|
1068 cpumask_clear_cpu(cpu, &cpu_active_map); |
|
1069 } |
|
1070 |
|
1071 static inline void init_cpu_present(const struct cpumask *src) |
|
1072 { |
|
1073 cpumask_copy(&cpu_present_map, src); |
|
1074 } |
|
1075 |
|
1076 static inline void init_cpu_possible(const struct cpumask *src) |
|
1077 { |
|
1078 cpumask_copy(&cpu_possible_map, src); |
|
1079 } |
|
1080 |
|
1081 static inline void init_cpu_online(const struct cpumask *src) |
|
1082 { |
|
1083 cpumask_copy(&cpu_online_map, src); |
|
1084 } |
|
1085 #endif /* __LINUX_CPUMASK_H */ |
1076 #endif /* __LINUX_CPUMASK_H */ |