Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'bitmap-for-6.19-rc5' of https://github.com/norov/linux

Pull bitmap fix from Yury Norov:
"Fix Rust build for architectures implementing their own find_bit() ops
(arm and m68k)"

* tag 'bitmap-for-6.19-rc5' of https://github.com/norov/linux:
rust: bitops: fix missing _find_* functions on 32-bit ARM

+42
+42
rust/helpers/bitops.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 3 #include <linux/bitops.h> 4 + #include <linux/find.h> 4 5 5 6 void rust_helper___set_bit(unsigned long nr, unsigned long *addr) 6 7 { ··· 22 21 { 23 22 clear_bit(nr, addr); 24 23 } 24 + 25 + /* 26 + * The rust_helper_ prefix is intentionally omitted below so that the 27 + * declarations in include/linux/find.h are compatible with these helpers. 28 + * 29 + * Note that the below #ifdefs mean that the helper is only created if C does 30 + * not provide a definition. 31 + */ 32 + #ifdef find_first_zero_bit 33 + __rust_helper 34 + unsigned long _find_first_zero_bit(const unsigned long *p, unsigned long size) 35 + { 36 + return find_first_zero_bit(p, size); 37 + } 38 + #endif /* find_first_zero_bit */ 39 + 40 + #ifdef find_next_zero_bit 41 + __rust_helper 42 + unsigned long _find_next_zero_bit(const unsigned long *addr, 43 + unsigned long size, unsigned long offset) 44 + { 45 + return find_next_zero_bit(addr, size, offset); 46 + } 47 + #endif /* find_next_zero_bit */ 48 + 49 + #ifdef find_first_bit 50 + __rust_helper 51 + unsigned long _find_first_bit(const unsigned long *addr, unsigned long size) 52 + { 53 + return find_first_bit(addr, size); 54 + } 55 + #endif /* find_first_bit */ 56 + 57 + #ifdef find_next_bit 58 + __rust_helper 59 + unsigned long _find_next_bit(const unsigned long *addr, unsigned long size, 60 + unsigned long offset) 61 + { 62 + return find_next_bit(addr, size, offset); 63 + } 64 + #endif /* find_next_bit */