hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/asm-generic/bitops/find.h
....@@ -80,4 +80,21 @@
8080
8181 #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */
8282
83
+/**
84
+ * find_next_clump8 - find next 8-bit clump with set bits in a memory region
85
+ * @clump: location to store copy of found clump
86
+ * @addr: address to base the search on
87
+ * @size: bitmap size in number of bits
88
+ * @offset: bit offset at which to start searching
89
+ *
90
+ * Returns the bit offset for the next set clump; the found clump value is
91
+ * copied to the location pointed by @clump. If no bits are set, returns @size.
92
+ */
93
+extern unsigned long find_next_clump8(unsigned long *clump,
94
+ const unsigned long *addr,
95
+ unsigned long size, unsigned long offset);
96
+
97
+#define find_first_clump8(clump, bits, size) \
98
+ find_next_clump8((clump), (bits), (size), 0)
99
+
83100 #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */