linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] jump_labels: Embedding static keys inside structures
@ 2016-09-19 17:21 Marc Zyngier
  2016-09-19 17:21 ` [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures Marc Zyngier
  2016-09-19 17:21 ` [PATCH 2/2] dynamic_debug: Use updated jump label API Marc Zyngier
  0 siblings, 2 replies; 9+ messages in thread
From: Marc Zyngier @ 2016-09-19 17:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jason Baron, Jonathan Corbet, Peter Zijlstra, Christoffer Dall,
	Vladimir Murzin, Catalin Marinas

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[1] 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.

[1] https://git.kernel.org/cgit/linux/kernel/git/kvmarm/kvmarm.git/commit/?h=queue&id=db6ca86d92d9d8f8e0bf9c1210a90ddf70e76136

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(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-22  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 17:21 [PATCH 0/2] jump_labels: Embedding static keys inside structures Marc Zyngier
2016-09-19 17:21 ` [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures Marc Zyngier
2016-09-20  9:42   ` Peter Zijlstra
2016-09-20  9:46     ` Marc Zyngier
2016-09-20 12:25     ` Christoffer Dall
2016-09-20 12:42       ` Peter Zijlstra
2016-09-20 12:54         ` Christoffer Dall
2016-09-22  7:47           ` Peter Zijlstra
2016-09-19 17:21 ` [PATCH 2/2] dynamic_debug: Use updated jump label API Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).