~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/jump_label_ratelimit.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/jump_label_ratelimit.h (Architecture sparc) and /include/linux/jump_label_ratelimit.h (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_JUMP_LABEL_RATELIMIT_H               2 #ifndef _LINUX_JUMP_LABEL_RATELIMIT_H
  3 #define _LINUX_JUMP_LABEL_RATELIMIT_H               3 #define _LINUX_JUMP_LABEL_RATELIMIT_H
  4                                                     4 
  5 #include <linux/jump_label.h>                       5 #include <linux/jump_label.h>
  6 #include <linux/workqueue.h>                        6 #include <linux/workqueue.h>
  7                                                     7 
  8 #if defined(CONFIG_JUMP_LABEL)                      8 #if defined(CONFIG_JUMP_LABEL)
  9 struct static_key_deferred {                        9 struct static_key_deferred {
 10         struct static_key key;                     10         struct static_key key;
 11         unsigned long timeout;                     11         unsigned long timeout;
 12         struct delayed_work work;                  12         struct delayed_work work;
 13 };                                                 13 };
 14                                                    14 
 15 struct static_key_true_deferred {                  15 struct static_key_true_deferred {
 16         struct static_key_true key;                16         struct static_key_true key;
 17         unsigned long timeout;                     17         unsigned long timeout;
 18         struct delayed_work work;                  18         struct delayed_work work;
 19 };                                                 19 };
 20                                                    20 
 21 struct static_key_false_deferred {                 21 struct static_key_false_deferred {
 22         struct static_key_false key;               22         struct static_key_false key;
 23         unsigned long timeout;                     23         unsigned long timeout;
 24         struct delayed_work work;                  24         struct delayed_work work;
 25 };                                                 25 };
 26                                                    26 
 27 #define static_key_slow_dec_deferred(x)            27 #define static_key_slow_dec_deferred(x)                                 \
 28         __static_key_slow_dec_deferred(&(x)->k     28         __static_key_slow_dec_deferred(&(x)->key, &(x)->work, (x)->timeout)
 29 #define static_branch_slow_dec_deferred(x)         29 #define static_branch_slow_dec_deferred(x)                              \
 30         __static_key_slow_dec_deferred(&(x)->k     30         __static_key_slow_dec_deferred(&(x)->key.key, &(x)->work, (x)->timeout)
 31                                                    31 
 32 #define static_key_deferred_flush(x)               32 #define static_key_deferred_flush(x)                                    \
 33         __static_key_deferred_flush((x), &(x)-     33         __static_key_deferred_flush((x), &(x)->work)
 34                                                    34 
 35 extern void                                        35 extern void
 36 __static_key_slow_dec_deferred(struct static_k     36 __static_key_slow_dec_deferred(struct static_key *key,
 37                                struct delayed_     37                                struct delayed_work *work,
 38                                unsigned long t     38                                unsigned long timeout);
 39 extern void __static_key_deferred_flush(void *     39 extern void __static_key_deferred_flush(void *key, struct delayed_work *work);
 40 extern void                                        40 extern void
 41 jump_label_rate_limit(struct static_key_deferr     41 jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl);
 42                                                    42 
 43 extern void jump_label_update_timeout(struct w     43 extern void jump_label_update_timeout(struct work_struct *work);
 44                                                    44 
 45 #define DEFINE_STATIC_KEY_DEFERRED_TRUE(name,      45 #define DEFINE_STATIC_KEY_DEFERRED_TRUE(name, rl)                       \
 46         struct static_key_true_deferred name =     46         struct static_key_true_deferred name = {                        \
 47                 .key =          { STATIC_KEY_I     47                 .key =          { STATIC_KEY_INIT_TRUE },               \
 48                 .timeout =      (rl),              48                 .timeout =      (rl),                                   \
 49                 .work = __DELAYED_WORK_INITIAL     49                 .work = __DELAYED_WORK_INITIALIZER((name).work,         \
 50                                                    50                                                    jump_label_update_timeout, \
 51                                                    51                                                    0),                  \
 52         }                                          52         }
 53                                                    53 
 54 #define DEFINE_STATIC_KEY_DEFERRED_FALSE(name,     54 #define DEFINE_STATIC_KEY_DEFERRED_FALSE(name, rl)                      \
 55         struct static_key_false_deferred name      55         struct static_key_false_deferred name = {                       \
 56                 .key =          { STATIC_KEY_I     56                 .key =          { STATIC_KEY_INIT_FALSE },              \
 57                 .timeout =      (rl),              57                 .timeout =      (rl),                                   \
 58                 .work = __DELAYED_WORK_INITIAL     58                 .work = __DELAYED_WORK_INITIALIZER((name).work,         \
 59                                                    59                                                    jump_label_update_timeout, \
 60                                                    60                                                    0),                  \
 61         }                                          61         }
 62                                                    62 
 63 #else   /* !CONFIG_JUMP_LABEL */                   63 #else   /* !CONFIG_JUMP_LABEL */
 64 struct static_key_deferred {                       64 struct static_key_deferred {
 65         struct static_key  key;                    65         struct static_key  key;
 66 };                                                 66 };
 67 struct static_key_true_deferred {                  67 struct static_key_true_deferred {
 68         struct static_key_true key;                68         struct static_key_true key;
 69 };                                                 69 };
 70 struct static_key_false_deferred {                 70 struct static_key_false_deferred {
 71         struct static_key_false key;               71         struct static_key_false key;
 72 };                                                 72 };
 73 #define DEFINE_STATIC_KEY_DEFERRED_TRUE(name,      73 #define DEFINE_STATIC_KEY_DEFERRED_TRUE(name, rl)       \
 74         struct static_key_true_deferred name =     74         struct static_key_true_deferred name = { STATIC_KEY_TRUE_INIT }
 75 #define DEFINE_STATIC_KEY_DEFERRED_FALSE(name,     75 #define DEFINE_STATIC_KEY_DEFERRED_FALSE(name, rl)      \
 76         struct static_key_false_deferred name      76         struct static_key_false_deferred name = { STATIC_KEY_FALSE_INIT }
 77                                                    77 
 78 #define static_branch_slow_dec_deferred(x)         78 #define static_branch_slow_dec_deferred(x)      static_branch_dec(&(x)->key)
 79                                                    79 
 80 static inline void static_key_slow_dec_deferre     80 static inline void static_key_slow_dec_deferred(struct static_key_deferred *key)
 81 {                                                  81 {
 82         STATIC_KEY_CHECK_USE(key);                 82         STATIC_KEY_CHECK_USE(key);
 83         static_key_slow_dec(&key->key);            83         static_key_slow_dec(&key->key);
 84 }                                                  84 }
 85 static inline void static_key_deferred_flush(v     85 static inline void static_key_deferred_flush(void *key)
 86 {                                                  86 {
 87         STATIC_KEY_CHECK_USE(key);                 87         STATIC_KEY_CHECK_USE(key);
 88 }                                                  88 }
 89 static inline void                                 89 static inline void
 90 jump_label_rate_limit(struct static_key_deferr     90 jump_label_rate_limit(struct static_key_deferred *key,
 91                 unsigned long rl)                  91                 unsigned long rl)
 92 {                                                  92 {
 93         STATIC_KEY_CHECK_USE(key);                 93         STATIC_KEY_CHECK_USE(key);
 94 }                                                  94 }
 95 #endif  /* CONFIG_JUMP_LABEL */                    95 #endif  /* CONFIG_JUMP_LABEL */
 96                                                    96 
 97 #define static_branch_deferred_inc(x)   static     97 #define static_branch_deferred_inc(x)   static_branch_inc(&(x)->key)
 98                                                    98 
 99 #endif  /* _LINUX_JUMP_LABEL_RATELIMIT_H */        99 #endif  /* _LINUX_JUMP_LABEL_RATELIMIT_H */
100                                                   100 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php