aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-03-04 19:19:19 -0500
committerRusty Russell <rusty@rustcorp.com.au>2015-03-04 23:57:06 -0500
commit9941a383df98193aa9a9b3662af7c1fcbc3070ee (patch)
treed6d460551fe2b0c22151e3ebd57f59c6fb6b45db
parente97636b487d0767500a1b898513577a5ce000ad9 (diff)
CPU_MASK_ALL/CPU_MASK_NONE: remove from deprecated region.
They're used to initialize various static fields, though static cpumasks should generally be avoided. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--include/linux/cpumask.h31
1 files changed, 12 insertions, 19 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 086549a665e2..dc037ae6f4f2 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -768,7 +768,7 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
768#if NR_CPUS <= BITS_PER_LONG 768#if NR_CPUS <= BITS_PER_LONG
769#define CPU_BITS_ALL \ 769#define CPU_BITS_ALL \
770{ \ 770{ \
771 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 771 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
772} 772}
773 773
774#else /* NR_CPUS > BITS_PER_LONG */ 774#else /* NR_CPUS > BITS_PER_LONG */
@@ -776,7 +776,7 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
776#define CPU_BITS_ALL \ 776#define CPU_BITS_ALL \
777{ \ 777{ \
778 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ 778 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
779 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 779 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
780} 780}
781#endif /* NR_CPUS > BITS_PER_LONG */ 781#endif /* NR_CPUS > BITS_PER_LONG */
782 782
@@ -797,38 +797,31 @@ cpumap_print_to_pagebuf(bool list, char *buf, const struct cpumask *mask)
797 nr_cpu_ids); 797 nr_cpu_ids);
798} 798}
799 799
800/*
801 *
802 * From here down, all obsolete. Use cpumask_ variants!
803 *
804 */
805#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
806#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
807
808#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
809
810#if NR_CPUS <= BITS_PER_LONG 800#if NR_CPUS <= BITS_PER_LONG
811
812#define CPU_MASK_ALL \ 801#define CPU_MASK_ALL \
813(cpumask_t) { { \ 802(cpumask_t) { { \
814 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 803 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
815} } 804} }
816
817#else 805#else
818
819#define CPU_MASK_ALL \ 806#define CPU_MASK_ALL \
820(cpumask_t) { { \ 807(cpumask_t) { { \
821 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ 808 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
822 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 809 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
823} } 810} }
824 811#endif /* NR_CPUS > BITS_PER_LONG */
825#endif
826 812
827#define CPU_MASK_NONE \ 813#define CPU_MASK_NONE \
828(cpumask_t) { { \ 814(cpumask_t) { { \
829 [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \ 815 [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
830} } 816} }
831 817
818/*
819 *
820 * From here down, all obsolete. Use cpumask_ variants!
821 *
822 */
823#ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
824
832#define CPU_MASK_CPU0 \ 825#define CPU_MASK_CPU0 \
833(cpumask_t) { { \ 826(cpumask_t) { { \
834 [0] = 1UL \ 827 [0] = 1UL \