[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181109231021.11658-22-linux@rasmusvillemoes.dk>
Date: Sat, 10 Nov 2018 00:10:19 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Andrew Morton <akpm@...ux-foundation.org>,
Jason Baron <jbaron@...mai.com>
Cc: linux-kernel@...r.kernel.org,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Ingo Molnar <mingo@...nel.org>
Subject: [PATCH v3 21/23] jump_label: move JUMP_TYPE_* constants to new asm-generic file
I'm going to need to refer to the JUMP_TYPE_FALSE and JUMP_TYPE_TRUE
constants from asm code. In order to do that, move them to an
asm-generic header and define them using the UL() helper macro.
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jason Baron <jbaron@...mai.com>
Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
include/asm-generic/jump_label.h | 11 +++++++++++
include/linux/jump_label.h | 6 +-----
2 files changed, 12 insertions(+), 5 deletions(-)
create mode 100644 include/asm-generic/jump_label.h
diff --git a/include/asm-generic/jump_label.h b/include/asm-generic/jump_label.h
new file mode 100644
index 000000000000..ff72c4c68ce3
--- /dev/null
+++ b/include/asm-generic/jump_label.h
@@ -0,0 +1,11 @@
+#ifndef __ASM_GENERIC_JUMP_LABEL_H
+#define __ASM_GENERIC_JUMP_LABEL_H
+
+#include <linux/const.h>
+
+#define JUMP_TYPE_FALSE UL(0)
+#define JUMP_TYPE_TRUE UL(1)
+#define JUMP_TYPE_LINKED UL(2)
+#define JUMP_TYPE_MASK UL(3)
+
+#endif /* __ASM_GENERIC_JUMP_LABEL_H */
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 5df6a621e464..989fa8c328fd 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -119,6 +119,7 @@ struct static_key {
#ifdef HAVE_JUMP_LABEL
#include <asm/jump_label.h>
+#include <asm-generic/jump_label.h>
#ifndef __ASSEMBLY__
#ifdef CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE
@@ -194,11 +195,6 @@ struct module;
#ifdef HAVE_JUMP_LABEL
-#define JUMP_TYPE_FALSE 0UL
-#define JUMP_TYPE_TRUE 1UL
-#define JUMP_TYPE_LINKED 2UL
-#define JUMP_TYPE_MASK 3UL
-
static __always_inline bool static_key_false(struct static_key *key)
{
return arch_static_branch(key, false);
--
2.19.1.6.gbde171bbf5
Powered by blists - more mailing lists