lkml.org 
[lkml]   [2019]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/fpu/init: Add __setup() functions back to fpu/init.c
Date
__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@intel.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
\
 
 \ /
  Last update: 2019-01-11 03:44    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog