[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220716230953.619868339@linutronix.de>
Date: Sun, 17 Jul 2022 01:17:35 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Linus Torvalds <torvalds@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Johannes Wikner <kwikner@...z.ch>,
Alyssa Milburn <alyssa.milburn@...ux.intel.com>,
Jann Horn <jannh@...gle.com>, "H.J. Lu" <hjl.tools@...il.com>,
Joao Moreira <joao.moreira@...el.com>,
Joseph Nuzman <joseph.nuzman@...el.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: [patch 16/38] modules: Make struct module_layout unconditionally available
To simplify the upcoming call thunk code it's desired to expose struct
module_layout even on !MDOULES builds. This spares conditionals and
#ifdeffery.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
include/linux/module.h | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -67,6 +67,28 @@ struct module_version_attribute {
const char *version;
};
+struct mod_tree_node {
+ struct module *mod;
+ struct latch_tree_node node;
+};
+
+struct module_layout {
+ /* The actual code + data. */
+ void *base;
+ /* Total size. */
+ unsigned int size;
+ /* The size of the executable code. */
+ unsigned int text_size;
+ /* Size of RO section of the module (text+rodata) */
+ unsigned int ro_size;
+ /* Size of RO after init section */
+ unsigned int ro_after_init_size;
+
+#ifdef CONFIG_MODULES_TREE_LOOKUP
+ struct mod_tree_node mtn;
+#endif
+};
+
extern ssize_t __modver_version_show(struct module_attribute *,
struct module_kobject *, char *);
@@ -316,28 +338,6 @@ enum module_state {
MODULE_STATE_UNFORMED, /* Still setting it up. */
};
-struct mod_tree_node {
- struct module *mod;
- struct latch_tree_node node;
-};
-
-struct module_layout {
- /* The actual code + data. */
- void *base;
- /* Total size. */
- unsigned int size;
- /* The size of the executable code. */
- unsigned int text_size;
- /* Size of RO section of the module (text+rodata) */
- unsigned int ro_size;
- /* Size of RO after init section */
- unsigned int ro_after_init_size;
-
-#ifdef CONFIG_MODULES_TREE_LOOKUP
- struct mod_tree_node mtn;
-#endif
-};
-
#ifdef CONFIG_MODULES_TREE_LOOKUP
/* Only touch one cacheline for common rbtree-for-core-layout case. */
#define __module_layout_align ____cacheline_aligned
Powered by blists - more mailing lists