#ifndef __LINUX_NODEMASK_H
#define __LINUX_NODEMASK_H
#include <linux/threads.h>
#include <linux/bitmap.h>
#include <linux/minmax.h>
#include <linux/nodemask_types.h>
#include <linux/numa.h>
#include <linux/random.h>
extern nodemask_t _unused_nodemask_arg_;
#define nodemask_pr_args(maskp) …
static __always_inline unsigned int __nodemask_pr_numnodes(const nodemask_t *m)
{ … }
static __always_inline const unsigned long *__nodemask_pr_bits(const nodemask_t *m)
{ … }
#define node_set(node, dst) …
static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
{ … }
#define node_clear(node, dst) …
static __always_inline void __node_clear(int node, volatile nodemask_t *dstp)
{ … }
#define nodes_setall(dst) …
static __always_inline void __nodes_setall(nodemask_t *dstp, unsigned int nbits)
{ … }
#define nodes_clear(dst) …
static __always_inline void __nodes_clear(nodemask_t *dstp, unsigned int nbits)
{ … }
#define node_isset(node, nodemask) …
#define node_test_and_set(node, nodemask) …
static __always_inline bool __node_test_and_set(int node, nodemask_t *addr)
{ … }
#define nodes_and(dst, src1, src2) …
static __always_inline void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_or(dst, src1, src2) …
static __always_inline void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_xor(dst, src1, src2) …
static __always_inline void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_andnot(dst, src1, src2) …
static __always_inline void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_complement(dst, src) …
static __always_inline void __nodes_complement(nodemask_t *dstp,
const nodemask_t *srcp, unsigned int nbits)
{ … }
#define nodes_equal(src1, src2) …
static __always_inline bool __nodes_equal(const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_intersects(src1, src2) …
static __always_inline bool __nodes_intersects(const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_subset(src1, src2) …
static __always_inline bool __nodes_subset(const nodemask_t *src1p,
const nodemask_t *src2p, unsigned int nbits)
{ … }
#define nodes_empty(src) …
static __always_inline bool __nodes_empty(const nodemask_t *srcp, unsigned int nbits)
{ … }
#define nodes_full(nodemask) …
static __always_inline bool __nodes_full(const nodemask_t *srcp, unsigned int nbits)
{ … }
#define nodes_weight(nodemask) …
static __always_inline int __nodes_weight(const nodemask_t *srcp, unsigned int nbits)
{ … }
#define nodes_shift_right(dst, src, n) …
static __always_inline void __nodes_shift_right(nodemask_t *dstp,
const nodemask_t *srcp, int n, int nbits)
{ … }
#define nodes_shift_left(dst, src, n) …
static __always_inline void __nodes_shift_left(nodemask_t *dstp,
const nodemask_t *srcp, int n, int nbits)
{ … }
#define first_node(src) …
static __always_inline unsigned int __first_node(const nodemask_t *srcp)
{ … }
#define next_node(n, src) …
static __always_inline unsigned int __next_node(int n, const nodemask_t *srcp)
{ … }
#define next_node_in(n, src) …
static __always_inline unsigned int __next_node_in(int node, const nodemask_t *srcp)
{ … }
static __always_inline void init_nodemask_of_node(nodemask_t *mask, int node)
{ … }
#define nodemask_of_node(node) …
#define first_unset_node(mask) …
static __always_inline unsigned int __first_unset_node(const nodemask_t *maskp)
{ … }
#define NODE_MASK_LAST_WORD …
#if MAX_NUMNODES <= BITS_PER_LONG
#define NODE_MASK_ALL …
#else
#define NODE_MASK_ALL …
#endif
#define NODE_MASK_NONE …
#define nodes_addr(src) …
#define nodemask_parse_user(ubuf, ulen, dst) …
static __always_inline int __nodemask_parse_user(const char __user *buf, int len,
nodemask_t *dstp, int nbits)
{ … }
#define nodelist_parse(buf, dst) …
static __always_inline int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
{ … }
#define node_remap(oldbit, old, new) …
static __always_inline int __node_remap(int oldbit,
const nodemask_t *oldp, const nodemask_t *newp, int nbits)
{ … }
#define nodes_remap(dst, src, old, new) …
static __always_inline void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
const nodemask_t *oldp, const nodemask_t *newp, int nbits)
{ … }
#define nodes_onto(dst, orig, relmap) …
static __always_inline void __nodes_onto(nodemask_t *dstp, const nodemask_t *origp,
const nodemask_t *relmapp, int nbits)
{ … }
#define nodes_fold(dst, orig, sz) …
static __always_inline void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp,
int sz, int nbits)
{ … }
#if MAX_NUMNODES > 1
#define for_each_node_mask(node, mask) …
#else
#define for_each_node_mask …
#endif
enum node_states { … };
extern nodemask_t node_states[NR_NODE_STATES];
#if MAX_NUMNODES > 1
static __always_inline int node_state(int node, enum node_states state)
{ … }
static __always_inline void node_set_state(int node, enum node_states state)
{ … }
static __always_inline void node_clear_state(int node, enum node_states state)
{ … }
static __always_inline int num_node_state(enum node_states state)
{ … }
#define for_each_node_state(__node, __state) …
#define first_online_node …
#define first_memory_node …
static __always_inline unsigned int next_online_node(int nid)
{ … }
static __always_inline unsigned int next_memory_node(int nid)
{ … }
extern unsigned int nr_node_ids;
extern unsigned int nr_online_nodes;
static __always_inline void node_set_online(int nid)
{ … }
static __always_inline void node_set_offline(int nid)
{ … }
#else
static __always_inline int node_state(int node, enum node_states state)
{
return node == 0;
}
static __always_inline void node_set_state(int node, enum node_states state)
{
}
static __always_inline void node_clear_state(int node, enum node_states state)
{
}
static __always_inline int num_node_state(enum node_states state)
{
return 1;
}
#define for_each_node_state …
#define first_online_node …
#define first_memory_node …
#define next_online_node …
#define next_memory_node …
#define nr_node_ids …
#define nr_online_nodes …
#define node_set_online …
#define node_set_offline …
#endif
static __always_inline int node_random(const nodemask_t *maskp)
{ … }
#define node_online_map …
#define node_possible_map …
#define num_online_nodes() …
#define num_possible_nodes() …
#define node_online(node) …
#define node_possible(node) …
#define for_each_node(node) …
#define for_each_online_node(node) …
#if NODES_SHIFT > 8
#define NODEMASK_ALLOC(type, name, gfp_flags) …
#define NODEMASK_FREE(m) …
#else
#define NODEMASK_ALLOC …
#define NODEMASK_FREE …
#endif
struct nodemask_scratch { … };
#define NODEMASK_SCRATCH(x) …
#define NODEMASK_SCRATCH_FREE(x) …
#endif