diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bitmap.h | 1 | ||||
-rw-r--r-- | include/linux/nodemask.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index daf8c480c786..6fb2720882fc 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -141,6 +141,7 @@ extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | |||
141 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 141 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
142 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 142 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
143 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); | 143 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); |
144 | extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); | ||
144 | 145 | ||
145 | #define BITMAP_LAST_WORD_MASK(nbits) \ | 146 | #define BITMAP_LAST_WORD_MASK(nbits) \ |
146 | ( \ | 147 | ( \ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index dba35e413371..8a8f1d09c133 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -66,6 +66,8 @@ | |||
66 | * int num_online_nodes() Number of online Nodes | 66 | * int num_online_nodes() Number of online Nodes |
67 | * int num_possible_nodes() Number of all possible Nodes | 67 | * int num_possible_nodes() Number of all possible Nodes |
68 | * | 68 | * |
69 | * int node_random(mask) Random node with set bit in mask | ||
70 | * | ||
69 | * int node_online(node) Is some node online? | 71 | * int node_online(node) Is some node online? |
70 | * int node_possible(node) Is some node possible? | 72 | * int node_possible(node) Is some node possible? |
71 | * | 73 | * |
@@ -430,6 +432,10 @@ static inline void node_set_offline(int nid) | |||
430 | node_clear_state(nid, N_ONLINE); | 432 | node_clear_state(nid, N_ONLINE); |
431 | nr_online_nodes = num_node_state(N_ONLINE); | 433 | nr_online_nodes = num_node_state(N_ONLINE); |
432 | } | 434 | } |
435 | |||
436 | #define node_random(mask) __node_random(&(mask)) | ||
437 | extern int __node_random(const nodemask_t *maskp); | ||
438 | |||
433 | #else | 439 | #else |
434 | 440 | ||
435 | static inline int node_state(int node, enum node_states state) | 441 | static inline int node_state(int node, enum node_states state) |
@@ -460,6 +466,8 @@ static inline int num_node_state(enum node_states state) | |||
460 | 466 | ||
461 | #define node_set_online(node) node_set_state((node), N_ONLINE) | 467 | #define node_set_online(node) node_set_state((node), N_ONLINE) |
462 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) | 468 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) |
469 | |||
470 | static inline int node_random(const nodemask_t mask) { return 0; } | ||
463 | #endif | 471 | #endif |
464 | 472 | ||
465 | #define node_online_map node_states[N_ONLINE] | 473 | #define node_online_map node_states[N_ONLINE] |