diff options
Diffstat (limited to 'include/linux/cpumask.h')
| -rw-r--r-- | include/linux/cpumask.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 0a9a6da21e74..b950e9d6008b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -803,6 +803,23 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) | |||
| 803 | } | 803 | } |
| 804 | #endif /* NR_CPUS > BITS_PER_LONG */ | 804 | #endif /* NR_CPUS > BITS_PER_LONG */ |
| 805 | 805 | ||
| 806 | /** | ||
| 807 | * cpumap_print_to_pagebuf - copies the cpumask into the buffer either | ||
| 808 | * as comma-separated list of cpus or hex values of cpumask | ||
| 809 | * @list: indicates whether the cpumap must be list | ||
| 810 | * @mask: the cpumask to copy | ||
| 811 | * @buf: the buffer to copy into | ||
| 812 | * | ||
| 813 | * Returns the length of the (null-terminated) @buf string, zero if | ||
| 814 | * nothing is copied. | ||
| 815 | */ | ||
| 816 | static inline ssize_t | ||
| 817 | cpumap_print_to_pagebuf(bool list, char *buf, const struct cpumask *mask) | ||
| 818 | { | ||
| 819 | return bitmap_print_to_pagebuf(list, buf, cpumask_bits(mask), | ||
| 820 | nr_cpumask_bits); | ||
| 821 | } | ||
| 822 | |||
| 806 | /* | 823 | /* |
| 807 | * | 824 | * |
| 808 | * From here down, all obsolete. Use cpumask_ variants! | 825 | * From here down, all obsolete. Use cpumask_ variants! |
