[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1547174753-31180-1-git-send-email-haoyu.tang@intel.com>
Date: Fri, 11 Jan 2019 10:45:53 +0800
From: Haoyu Tang <haoyu.tang@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>
CC: <x86@...nel.org>, Andy Lutomirski <luto@...nel.org>,
"Sebastian Andrzej Siewior" <bigeasy@...utronix.de>,
Nicolai Stange <nstange@...e.de>,
"Haoyu Tang" <haoyu.tang@...el.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86/fpu/init: Add __setup() functions back to fpu/init.c
__setup() functions were removed in:
commit 4f81cbafcce2 ("x86/fpu: Fix early FPU command-line parsing")
caused that FPU parameter is passed as an argument to init, the dummy
__setup() functions can avoid this.
Signed-off-by: Haoyu Tang <haoyu.tang@...el.com>
---
arch/x86/kernel/fpu/init.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
index 6abd835..df325d0 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -301,3 +301,39 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
fpu__init_system_ctx_switch();
}
+
+/* Although parse fpu parameters early before parse_early_param(),but
+ * __setup() is still mandatory in order not to pass fpu parameters
+ * into init as argument. At here, the interfaces don't need to set
+ * registers again, they are only used to indicate parse_args() that
+ * the parameter has been consumed.
+ */
+static int __init no_387(char *s)
+{
+ return 1;
+}
+__setup("no387", no_387);
+
+static int __init x86_noxsave_setup(char *s)
+{
+ return 1;
+}
+__setup("noxsave", x86_noxsave_setup);
+
+static int __init x86_noxsaveopt_setup(char *s)
+{
+ return 1;
+}
+__setup("noxsaveopt", x86_noxsaveopt_setup);
+
+static int __init x86_noxsaves_setup(char *s)
+{
+ return 1;
+}
+__setup("noxsaves", x86_noxsaves_setup);
+
+static int __init x86_nofxsr_setup(char *s)
+{
+ return 1;
+}
+__setup("nofxsr", x86_nofxsr_setup);
--
1.9.1
Powered by blists - more mailing lists