#include <linux/spinlock.h>
#include <linux/random.h>
struct static_key_true *key;
static void once_deferred(struct work_struct *w)
work = container_of(w, struct once_work, work);
BUG_ON(!static_key_enabled(work->key));
static_branch_disable(work->key);
static void once_disable_jump(struct static_key_true *key)
w = kmalloc(sizeof(*w), GFP_ATOMIC);
INIT_WORK(&w->work, once_deferred);
static DEFINE_SPINLOCK(once_lock);
bool __do_once_start(bool *done, unsigned long *flags)
spin_lock_irqsave(&once_lock, *flags);
spin_unlock_irqrestore(&once_lock, *flags);
EXPORT_SYMBOL(__do_once_start);
void __do_once_done(bool *done, struct static_key_true *once_key,
spin_unlock_irqrestore(&once_lock, *flags);
once_disable_jump(once_key);
EXPORT_SYMBOL(__do_once_done);