The jump_label API assumes that the static keys will be allocated as
top-level static variables. Nothing wrong with that, but this makes it
slightly awkward when trying to embed the static key inside another
structure. The user ends up diving into the internals of the API,
making the result a bit awkward.
This series adds the usual DECLARE/INIT macros that make it possible
to embed the key in macros, as well as initialize it correctly. As an
example, the dynamic_debug.h file is converted to this API.
The ulterior motive behind that patch is this bit of KVM/ARM, which
is using such a construct and could use the cleanup.
Patches on top of arm64/for-next/core, which already contains some
jump label changes.
Marc Zyngier (2):
jump_labels: Add API to deal with keys embedded in structures
dynamic_debug: Use updated jump label API
Documentation/static-keys.txt | 19 +++++++++++++++++++
include/linux/dynamic_debug.h | 22 ++++++++++------------
include/linux/jump_label.h | 21 ++++++++++++++++++---
3 files changed, 47 insertions(+), 15 deletions(-)