Skip to content

Commit a4e98a3

Browse files
committed
Merge tag 'bitmap-6.5-rc5' of https://github.com:/norov/linux
Pull bitmap fixes from Yury Norov: - Fix for bitmap documentation - Fix for kernel build under certain configurations * tag 'bitmap-6.5-rc5' of https://github.com:/norov/linux: lib/bitmap: workaround const_eval test build failure cpumask: eliminate kernel-doc warnings
2 parents 4b95459 + 2356d19 commit a4e98a3

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

include/linux/cpumask.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ static inline unsigned int cpumask_first_zero(const struct cpumask *srcp)
175175

176176
/**
177177
* cpumask_first_and - return the first cpu from *srcp1 & *srcp2
178-
* @src1p: the first input
179-
* @src2p: the second input
178+
* @srcp1: the first input
179+
* @srcp2: the second input
180180
*
181181
* Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and().
182182
*/
@@ -1197,6 +1197,10 @@ cpumap_print_bitmask_to_buf(char *buf, const struct cpumask *mask,
11971197
/**
11981198
* cpumap_print_list_to_buf - copies the cpumask into the buffer as
11991199
* comma-separated list of cpus
1200+
* @buf: the buffer to copy into
1201+
* @mask: the cpumask to copy
1202+
* @off: in the string from which we are copying, we copy to @buf
1203+
* @count: the maximum number of bytes to print
12001204
*
12011205
* Everything is same with the above cpumap_print_bitmask_to_buf()
12021206
* except the print format.

lib/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
8282
obj-$(CONFIG_TEST_DYNAMIC_DEBUG) += test_dynamic_debug.o
8383
obj-$(CONFIG_TEST_PRINTF) += test_printf.o
8484
obj-$(CONFIG_TEST_SCANF) += test_scanf.o
85+
8586
obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
87+
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_KASAN),yy)
88+
# FIXME: Clang breaks test_bitmap_const_eval when KASAN and GCOV are enabled
89+
GCOV_PROFILE_test_bitmap.o := n
90+
endif
91+
8692
obj-$(CONFIG_TEST_UUID) += test_uuid.o
8793
obj-$(CONFIG_TEST_XARRAY) += test_xarray.o
8894
obj-$(CONFIG_TEST_MAPLE_TREE) += test_maple_tree.o

lib/cpumask.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ EXPORT_SYMBOL(cpumask_next_wrap);
4545
* alloc_cpumask_var_node - allocate a struct cpumask on a given node
4646
* @mask: pointer to cpumask_var_t where the cpumask is returned
4747
* @flags: GFP_ flags
48+
* @node: memory node from which to allocate or %NUMA_NO_NODE
4849
*
4950
* Only defined when CONFIG_CPUMASK_OFFSTACK=y, otherwise is
5051
* a nop returning a constant 1 (in <linux/cpumask.h>)
@@ -157,7 +158,9 @@ EXPORT_SYMBOL(cpumask_local_spread);
157158
static DEFINE_PER_CPU(int, distribute_cpu_mask_prev);
158159

159160
/**
160-
* cpumask_any_and_distribute - Return an arbitrary cpu within srcp1 & srcp2.
161+
* cpumask_any_and_distribute - Return an arbitrary cpu within src1p & src2p.
162+
* @src1p: first &cpumask for intersection
163+
* @src2p: second &cpumask for intersection
161164
*
162165
* Iterated calls using the same srcp1 and srcp2 will be distributed within
163166
* their intersection.

lib/test_bitmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,10 @@ static void __init test_bitmap_print_buf(void)
11611161
}
11621162
}
11631163

1164+
/*
1165+
* FIXME: Clang breaks compile-time evaluations when KASAN and GCOV are enabled.
1166+
* To workaround it, GCOV is force-disabled in Makefile for this configuration.
1167+
*/
11641168
static void __init test_bitmap_const_eval(void)
11651169
{
11661170
DECLARE_BITMAP(bitmap, BITS_PER_LONG);
@@ -1186,11 +1190,7 @@ static void __init test_bitmap_const_eval(void)
11861190
* the compiler is fixed.
11871191
*/
11881192
bitmap_clear(bitmap, 0, BITS_PER_LONG);
1189-
#if defined(__s390__) && defined(__clang__)
1190-
if (!const_test_bit(7, bitmap))
1191-
#else
11921193
if (!test_bit(7, bitmap))
1193-
#endif
11941194
bitmap_set(bitmap, 5, 2);
11951195

11961196
/* Equals to `unsigned long bitopvar = BIT(20)` */

0 commit comments

Comments
 (0)