From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbcISRVg (ORCPT ); Mon, 19 Sep 2016 13:21:36 -0400 Received: from foss.arm.com ([217.140.101.70]:40320 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbcISRVe (ORCPT ); Mon, 19 Sep 2016 13:21:34 -0400 From: Marc Zyngier To: linux-kernel@vger.kernel.org Cc: Jason Baron , Jonathan Corbet , Peter Zijlstra , Christoffer Dall , Vladimir Murzin , Catalin Marinas Subject: [PATCH 0/2] jump_labels: Embedding static keys inside structures Date: Mon, 19 Sep 2016 18:21:26 +0100 Message-Id: <1474305688-22553-1-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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