diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2016-09-05 19:25:47 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-07 10:41:11 +0200 |
commit | ef0da55a84a345f323ceddda3b6c78b25de90435 (patch) | |
tree | 3e2573808bf74527b393823533fe0be5b009522f /Documentation/static-keys.txt | |
parent | arm64: mm: drop fixup_init() and mm.h (diff) | |
download | linux-ef0da55a84a345f323ceddda3b6c78b25de90435.tar.xz linux-ef0da55a84a345f323ceddda3b6c78b25de90435.zip |
jump_labels: Allow array initialisers
The static key API is currently designed around single variable
definitions. There are cases where an array of static keys is desirable,
so extend the API to allow this rather than using the internal static
key implementation directly.
Cc: Jason Baron <jbaron@akamai.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Suggested-by: Dave P Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation/static-keys.txt')
-rw-r--r-- | Documentation/static-keys.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt index 477927becacb..ea8d7b4e53f0 100644 --- a/Documentation/static-keys.txt +++ b/Documentation/static-keys.txt @@ -15,6 +15,8 @@ The updated API replacements are: DEFINE_STATIC_KEY_TRUE(key); DEFINE_STATIC_KEY_FALSE(key); +DEFINE_STATIC_KEY_ARRAY_TRUE(keys, count); +DEFINE_STATIC_KEY_ARRAY_FALSE(keys, count); static_branch_likely() static_branch_unlikely() @@ -140,6 +142,13 @@ static_branch_inc(), will change the branch back to true. Likewise, if the key is initialized false, a 'static_branch_inc()', will change the branch to true. And then a 'static_branch_dec()', will again make the branch false. +Where an array of keys is required, it can be defined as: + + DEFINE_STATIC_KEY_ARRAY_TRUE(keys, count); + +or: + + DEFINE_STATIC_KEY_ARRAY_FALSE(keys, count); 4) Architecture level code patching interface, 'jump labels' |