Commit ad8258e8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'bitmap-6.5-rc1' of https://github.com/norov/linux

Pull bitmap updates from Yury Norov:
 "Fixes for different bitmap pieces:

   - lib/test_bitmap: increment failure counter properly

     The tests that don't use expect_eq() macro to determine that a test
     is failured must increment failed_tests explicitly.

   - lib/bitmap: drop optimization of bitmap_{from,to}_arr64

     bitmap_{from,to}_arr64() optimization is overly optimistic
     on 32-bit LE architectures when it's wired to
     bitmap_copy_clear_tail().

   - nodemask: Drop duplicate check in for_each_node_mask()

     As the return value type of first_node() became unsigned, the node
     >= 0 became unnecessary.

   - cpumask: fix function description kernel-doc notation

   - MAINTAINERS: Add bits.h and bitfield.h to the BITMAP API record

     Add linux/bits.h and linux/bitfield.h for visibility"

* tag 'bitmap-6.5-rc1' of https://github.com/norov/linux:
  MAINTAINERS: Add bitfield.h to the BITMAP API record
  MAINTAINERS: Add bits.h to the BITMAP API record
  cpumask: fix function description kernel-doc notation
  nodemask: Drop duplicate check in for_each_node_mask()
  lib/bitmap: drop optimization of bitmap_{from,to}_arr64
  lib/test_bitmap: increment failure counter properly
parents 8689f4f2 2a3110e3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3499,18 +3499,24 @@ M: Yury Norov <yury.norov@gmail.com>
R:	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
S:	Maintained
F:	include/linux/bitfield.h
F:	include/linux/bitmap.h
F:	include/linux/bits.h
F:	include/linux/cpumask.h
F:	include/linux/find.h
F:	include/linux/nodemask.h
F:	include/vdso/bits.h
F:	lib/bitmap.c
F:	lib/cpumask.c
F:	lib/cpumask_kunit.c
F:	lib/find_bit.c
F:	lib/find_bit_benchmark.c
F:	lib/test_bitmap.c
F:	tools/include/linux/bitfield.h
F:	tools/include/linux/bitmap.h
F:	tools/include/linux/bits.h
F:	tools/include/linux/find.h
F:	tools/include/vdso/bits.h
F:	tools/lib/bitmap.c
F:	tools/lib/find_bit.c
+3 −5
Original line number Diff line number Diff line
@@ -302,12 +302,10 @@ void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap,
#endif

/*
 * On 64-bit systems bitmaps are represented as u64 arrays internally. On LE32
 * machines the order of hi and lo parts of numbers match the bitmap structure.
 * In both cases conversion is not needed when copying data from/to arrays of
 * u64.
 * On 64-bit systems bitmaps are represented as u64 arrays internally. So,
 * the conversion is not needed when copying data from/to arrays of u64.
 */
#if (BITS_PER_LONG == 32) && defined(__BIG_ENDIAN)
#if BITS_PER_LONG == 32
void bitmap_from_arr64(unsigned long *bitmap, const u64 *buf, unsigned int nbits);
void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits);
#else
+1 −1
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ static inline void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp,
#if MAX_NUMNODES > 1
#define for_each_node_mask(node, mask)				    \
	for ((node) = first_node(mask);				    \
	     (node >= 0) && (node) < MAX_NUMNODES;		    \
	     (node) < MAX_NUMNODES;				    \
	     (node) = next_node((node), (mask)))
#else /* MAX_NUMNODES == 1 */
#define for_each_node_mask(node, mask)                                  \
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,7 @@ void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, unsigned int nbits)
EXPORT_SYMBOL(bitmap_to_arr32);
#endif

#if (BITS_PER_LONG == 32) && defined(__BIG_ENDIAN)
#if BITS_PER_LONG == 32
/**
 * bitmap_from_arr64 - copy the contents of u64 array of bits to bitmap
 *	@bitmap: array of unsigned longs, the destination bitmap
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(cpumask_local_spread);
static DEFINE_PER_CPU(int, distribute_cpu_mask_prev);

/**
 * Returns an arbitrary cpu within srcp1 & srcp2.
 * cpumask_any_and_distribute - Return an arbitrary cpu within srcp1 & srcp2.
 *
 * Iterated calls using the same srcp1 and srcp2 will be distributed within
 * their intersection.
Loading