mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
bitmap updates for v6.20
- more rust helpers (Alice); - more bitops tests (Ryota); - FIND_NTH_BIT() uninitialized variable fix (Lee Yongjun); - random cleanups (Andy, H. Peter). -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEi8GdvG6xMhdgpu/4sUSA/TofvsgFAmmJIqMACgkQsUSA/Tof vsj/uwv/WIv9Wa3oTm3qzkIyaxeowIQE+DeDduporSoO8fnVfEYHjPuihMy3J5Gv x6iNUq9n8fMhmg/qHHyKwb/Ow8Ob11re9MZWS6a02wlm8Het0W9hKEk1z7qauFsI Vqq3rlMO3wYGaSPmlnh7rn/NHByrJ49ZrJcoX3he0Ov5MKp1w+dP3Czee4HGTb3A SM0cf4iCR3/Jj3flTsMghZgqZKNhsIe+ejX++dFPhmv82FHbIBcwUfN6CM27OGdy M7GAro1xIaoTwQVKCO2AycLAu8j+Rx9s+mcGuIAWynDo6YG1tVetADZQ+nRJG+x9 WdUDZwBDyEZlx/8BGnS56wevYxXEfC0lMTTgBqsYlCtLToyeE8G6NUVCLzEJAQCJ iWhcsenQVIiEHtYBZI/o2PmEp1Puzk1jI0+uFib1jE5Llf3+FrfMQGOiN2TBStEa zVIOipr+L9EaBbJdiKCV1jTl/MoDuCdRPLyby8egxPS+rk4RugvDsGc31XN48118 OHIJO2M/ =WnLV -----END PGP SIGNATURE----- Merge tag 'bitmap-for-6.20' of https://github.com/norov/linux Pull bitmap updates from Yury Norov: - more rust helpers (Alice) - more bitops tests (Ryota) - FIND_NTH_BIT() uninitialized variable fix (Lee Yongjun) - random cleanups (Andy, H. Peter) * tag 'bitmap-for-6.20' of https://github.com/norov/linux: lib/tests: extend KUnit test for bitops with more cases bitops: Add more files to the MAINTAINERS lib/find_bit: fix uninitialized variable use in FIND_NTH_BIT lib/tests: add KUnit test for bitops rust: cpumask: add __rust_helper to helpers rust: bitops: add __rust_helper to helpers rust: bitmap: add __rust_helper to helpers linux/bitfield.h: replace __auto_type with auto
This commit is contained in:
commit
f144367d01
9 changed files with 243 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <linux/bitmap.h>
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_bitmap_copy_and_extend(unsigned long *to, const unsigned long *from,
|
||||
unsigned int count, unsigned int size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,21 +3,25 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/find.h>
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
|
||||
{
|
||||
__set_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
|
||||
{
|
||||
__clear_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
|
||||
{
|
||||
set_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
|
||||
{
|
||||
clear_bit(nr, addr);
|
||||
|
|
|
|||
|
|
@ -2,67 +2,80 @@
|
|||
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
|
||||
{
|
||||
cpumask_set_cpu(cpu, dstp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
|
||||
{
|
||||
__cpumask_set_cpu(cpu, dstp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
|
||||
{
|
||||
cpumask_clear_cpu(cpu, dstp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp)
|
||||
{
|
||||
__cpumask_clear_cpu(cpu, dstp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp)
|
||||
{
|
||||
return cpumask_test_cpu(cpu, srcp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_cpumask_setall(struct cpumask *dstp)
|
||||
{
|
||||
cpumask_setall(dstp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
bool rust_helper_cpumask_empty(struct cpumask *srcp)
|
||||
{
|
||||
return cpumask_empty(srcp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
bool rust_helper_cpumask_full(struct cpumask *srcp)
|
||||
{
|
||||
return cpumask_full(srcp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
unsigned int rust_helper_cpumask_weight(struct cpumask *srcp)
|
||||
{
|
||||
return cpumask_weight(srcp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp)
|
||||
{
|
||||
cpumask_copy(dstp, srcp);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
|
||||
{
|
||||
return alloc_cpumask_var(mask, flags);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
|
||||
{
|
||||
return zalloc_cpumask_var(mask, flags);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_CPUMASK_OFFSTACK
|
||||
__rust_helper
|
||||
void rust_helper_free_cpumask_var(cpumask_var_t mask)
|
||||
{
|
||||
free_cpumask_var(mask);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue