diff options
author | Yury Norov <yury.norov@gmail.com> | 2025-02-14 20:40:00 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-02-16 06:52:19 -1000 |
commit | 7665054ee0dd0caba6f5f7bae48aa5f221218496 (patch) | |
tree | 1a0b16a80861387a7e51ae5636defcc068175e0b /include/linux/nodemask.h | |
parent | f2c880fc8133e4607f9e0e22d08e5e2098c3604a (diff) |
nodemask: add nodes_copy()
Nodemasks API misses the plain nodes_copy() which is required in this
series.
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/nodemask.h')
-rw-r--r-- | include/linux/nodemask.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 9fd7a0ce9c1a..41cf43c4e70f 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -191,6 +191,13 @@ static __always_inline void __nodes_andnot(nodemask_t *dstp, const nodemask_t *s bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); } +#define nodes_copy(dst, src) __nodes_copy(&(dst), &(src), MAX_NUMNODES) +static __always_inline void __nodes_copy(nodemask_t *dstp, + const nodemask_t *srcp, unsigned int nbits) +{ + bitmap_copy(dstp->bits, srcp->bits, nbits); +} + #define nodes_complement(dst, src) \ __nodes_complement(&(dst), &(src), MAX_NUMNODES) static __always_inline void __nodes_complement(nodemask_t *dstp, |