Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_JUMP_LABEL_RATELIMIT_H
|
|
#define _LINUX_JUMP_LABEL_RATELIMIT_H
|
|
|
|
#include <linux/jump_label.h>
|
|
#include <linux/workqueue.h>
|
|
|
|
#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
|
|
struct static_key_deferred {
|
|
struct static_key key;
|
|
unsigned long timeout;
|
|
struct delayed_work work;
|
|
};
|
|
#endif
|
|
|
|
#ifdef HAVE_JUMP_LABEL
|
|
extern void static_key_slow_dec_deferred(struct static_key_deferred *key);
|
|
extern void static_key_deferred_flush(struct static_key_deferred *key);
|
|
extern void
|
|
jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl);
|
|
|
|
#else /* !HAVE_JUMP_LABEL */
|
|
struct static_key_deferred {
|
|
struct static_key key;
|
|
};
|
|
static inline void static_key_slow_dec_deferred(struct static_key_deferred *key)
|
|
{
|
|
STATIC_KEY_CHECK_USE();
|
|
static_key_slow_dec(&key->key);
|
|
}
|
|
static inline void static_key_deferred_flush(struct static_key_deferred *key)
|
|
{
|
|
STATIC_KEY_CHECK_USE();
|
|
}
|
|
static inline void
|
|
jump_label_rate_limit(struct static_key_deferred *key,
|
|
unsigned long rl)
|
|
{
|
|
STATIC_KEY_CHECK_USE();
|
|
}
|
|
#endif /* HAVE_JUMP_LABEL */
|
|
#endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */
|