#include <linux/sched.h>
#include <linux/random.h>
#include <linux/sbitmap.h>
#include <linux/seq_file.h>
static int init_alloc_hint(struct sbitmap *sb, gfp_t flags)
{ … }
static inline unsigned update_alloc_hint_before_get(struct sbitmap *sb,
unsigned int depth)
{ … }
static inline void update_alloc_hint_after_get(struct sbitmap *sb,
unsigned int depth,
unsigned int hint,
unsigned int nr)
{ … }
static inline bool sbitmap_deferred_clear(struct sbitmap_word *map,
unsigned int depth, unsigned int alloc_hint, bool wrap)
{ … }
int sbitmap_init_node(struct sbitmap *sb, unsigned int depth, int shift,
gfp_t flags, int node, bool round_robin,
bool alloc_hint)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_resize(struct sbitmap *sb, unsigned int depth)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __sbitmap_get_word(unsigned long *word, unsigned long depth,
unsigned int hint, bool wrap)
{ … }
static int sbitmap_find_bit_in_word(struct sbitmap_word *map,
unsigned int depth,
unsigned int alloc_hint,
bool wrap)
{ … }
static int sbitmap_find_bit(struct sbitmap *sb,
unsigned int depth,
unsigned int index,
unsigned int alloc_hint,
bool wrap)
{ … }
static int __sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint)
{ … }
int sbitmap_get(struct sbitmap *sb)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __sbitmap_get_shallow(struct sbitmap *sb,
unsigned int alloc_hint,
unsigned long shallow_depth)
{ … }
int sbitmap_get_shallow(struct sbitmap *sb, unsigned long shallow_depth)
{ … }
EXPORT_SYMBOL_GPL(…);
bool sbitmap_any_bit_set(const struct sbitmap *sb)
{ … }
EXPORT_SYMBOL_GPL(…);
static unsigned int __sbitmap_weight(const struct sbitmap *sb, bool set)
{ … }
static unsigned int sbitmap_cleared(const struct sbitmap *sb)
{ … }
unsigned int sbitmap_weight(const struct sbitmap *sb)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_show(struct sbitmap *sb, struct seq_file *m)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline void emit_byte(struct seq_file *m, unsigned int offset, u8 byte)
{ … }
void sbitmap_bitmap_show(struct sbitmap *sb, struct seq_file *m)
{ … }
EXPORT_SYMBOL_GPL(…);
static unsigned int sbq_calc_wake_batch(struct sbitmap_queue *sbq,
unsigned int depth)
{ … }
int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth,
int shift, bool round_robin, gfp_t flags, int node)
{ … }
EXPORT_SYMBOL_GPL(…);
static void sbitmap_queue_update_wake_batch(struct sbitmap_queue *sbq,
unsigned int depth)
{ … }
void sbitmap_queue_recalculate_wake_batch(struct sbitmap_queue *sbq,
unsigned int users)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_queue_resize(struct sbitmap_queue *sbq, unsigned int depth)
{ … }
EXPORT_SYMBOL_GPL(…);
int __sbitmap_queue_get(struct sbitmap_queue *sbq)
{ … }
EXPORT_SYMBOL_GPL(…);
unsigned long __sbitmap_queue_get_batch(struct sbitmap_queue *sbq, int nr_tags,
unsigned int *offset)
{ … }
int sbitmap_queue_get_shallow(struct sbitmap_queue *sbq,
unsigned int shallow_depth)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_queue_min_shallow_depth(struct sbitmap_queue *sbq,
unsigned int min_shallow_depth)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __sbitmap_queue_wake_up(struct sbitmap_queue *sbq, int nr)
{ … }
void sbitmap_queue_wake_up(struct sbitmap_queue *sbq, int nr)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline void sbitmap_update_cpu_hint(struct sbitmap *sb, int cpu, int tag)
{ … }
void sbitmap_queue_clear_batch(struct sbitmap_queue *sbq, int offset,
int *tags, int nr_tags)
{ … }
void sbitmap_queue_clear(struct sbitmap_queue *sbq, unsigned int nr,
unsigned int cpu)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_queue_wake_all(struct sbitmap_queue *sbq)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_queue_show(struct sbitmap_queue *sbq, struct seq_file *m)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_add_wait_queue(struct sbitmap_queue *sbq,
struct sbq_wait_state *ws,
struct sbq_wait *sbq_wait)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_del_wait_queue(struct sbq_wait *sbq_wait)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_prepare_to_wait(struct sbitmap_queue *sbq,
struct sbq_wait_state *ws,
struct sbq_wait *sbq_wait, int state)
{ … }
EXPORT_SYMBOL_GPL(…);
void sbitmap_finish_wait(struct sbitmap_queue *sbq, struct sbq_wait_state *ws,
struct sbq_wait *sbq_wait)
{ … }
EXPORT_SYMBOL_GPL(…);