diff options
| -rw-r--r-- | Documentation/static-keys.txt | 4 | ||||
| -rw-r--r-- | include/linux/jump_label.h | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt index ec911583f6c5..477927becacb 100644 --- a/Documentation/static-keys.txt +++ b/Documentation/static-keys.txt | |||
| @@ -15,8 +15,8 @@ The updated API replacements are: | |||
| 15 | 15 | ||
| 16 | DEFINE_STATIC_KEY_TRUE(key); | 16 | DEFINE_STATIC_KEY_TRUE(key); |
| 17 | DEFINE_STATIC_KEY_FALSE(key); | 17 | DEFINE_STATIC_KEY_FALSE(key); |
| 18 | static_key_likely() | 18 | static_branch_likely() |
| 19 | static_key_unlikely() | 19 | static_branch_unlikely() |
| 20 | 20 | ||
| 21 | 0) Abstract | 21 | 0) Abstract |
| 22 | 22 | ||
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 0684bd3a48fc..f1094238ab2a 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
| @@ -21,8 +21,8 @@ | |||
| 21 | * | 21 | * |
| 22 | * DEFINE_STATIC_KEY_TRUE(key); | 22 | * DEFINE_STATIC_KEY_TRUE(key); |
| 23 | * DEFINE_STATIC_KEY_FALSE(key); | 23 | * DEFINE_STATIC_KEY_FALSE(key); |
| 24 | * static_key_likely() | 24 | * static_branch_likely() |
| 25 | * static_key_unlikely() | 25 | * static_branch_unlikely() |
| 26 | * | 26 | * |
| 27 | * Jump labels provide an interface to generate dynamic branches using | 27 | * Jump labels provide an interface to generate dynamic branches using |
| 28 | * self-modifying code. Assuming toolchain and architecture support, if we | 28 | * self-modifying code. Assuming toolchain and architecture support, if we |
| @@ -45,12 +45,10 @@ | |||
| 45 | * statement, setting the key to true requires us to patch in a jump | 45 | * statement, setting the key to true requires us to patch in a jump |
| 46 | * to the out-of-line of true branch. | 46 | * to the out-of-line of true branch. |
| 47 | * | 47 | * |
| 48 | * In addtion to static_branch_{enable,disable}, we can also reference count | 48 | * In addition to static_branch_{enable,disable}, we can also reference count |
| 49 | * the key or branch direction via static_branch_{inc,dec}. Thus, | 49 | * the key or branch direction via static_branch_{inc,dec}. Thus, |
| 50 | * static_branch_inc() can be thought of as a 'make more true' and | 50 | * static_branch_inc() can be thought of as a 'make more true' and |
| 51 | * static_branch_dec() as a 'make more false'. The inc()/dec() | 51 | * static_branch_dec() as a 'make more false'. |
| 52 | * interface is meant to be used exclusively from the inc()/dec() for a given | ||
| 53 | * key. | ||
| 54 | * | 52 | * |
| 55 | * Since this relies on modifying code, the branch modifying functions | 53 | * Since this relies on modifying code, the branch modifying functions |
| 56 | * must be considered absolute slow paths (machine wide synchronization etc.). | 54 | * must be considered absolute slow paths (machine wide synchronization etc.). |
