aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Ebbert <76306.1226@compuserve.com>2006-03-23 05:59:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:04 -0500
commit4f88651125e2ca8b106b6f65b65ea45776517bf3 (patch)
treea9865c268c57bd1752a66899615d8694d5ddaea8
parent3bc9b76bede9b3c72088258c7e72eb823f3351d4 (diff)
[PATCH] i386: allow disabling X86_FEATURE_SEP at boot
Allow the x86 "sep" feature to be disabled at bootup. This forces use of the int80 vsyscall. Mainly for testing or benchmarking the int80 vsyscall code. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--Documentation/kernel-parameters.txt6
-rw-r--r--arch/i386/kernel/cpu/common.c15
2 files changed, 19 insertions, 2 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index fc99075e0af4..880be3a30d8d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1008,7 +1008,9 @@ running once the system is up.
1008 noexec=on: enable non-executable mappings (default) 1008 noexec=on: enable non-executable mappings (default)
1009 noexec=off: disable nn-executable mappings 1009 noexec=off: disable nn-executable mappings
1010 1010
1011 nofxsr [BUGS=IA-32] 1011 nofxsr [BUGS=IA-32] Disables x86 floating point extended
1012 register save and restore. The kernel will only save
1013 legacy floating-point registers on task switch.
1012 1014
1013 nohlt [BUGS=ARM] 1015 nohlt [BUGS=ARM]
1014 1016
@@ -1053,6 +1055,8 @@ running once the system is up.
1053 1055
1054 nosbagart [IA-64] 1056 nosbagart [IA-64]
1055 1057
1058 nosep [BUGS=IA-32] Disables x86 SYSENTER/SYSEXIT support.
1059
1056 nosmp [SMP] Tells an SMP kernel to act as a UP kernel. 1060 nosmp [SMP] Tells an SMP kernel to act as a UP kernel.
1057 1061
1058 nosync [HW,M68K] Disables sync negotiation for all devices. 1062 nosync [HW,M68K] Disables sync negotiation for all devices.
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index f63dcfb16dad..bbfc278dfa49 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -26,8 +26,9 @@ DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
26EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); 26EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
27 27
28static int cachesize_override __cpuinitdata = -1; 28static int cachesize_override __cpuinitdata = -1;
29static int disable_x86_fxsr __cpuinitdata = 0; 29static int disable_x86_fxsr __cpuinitdata;
30static int disable_x86_serial_nr __cpuinitdata = 1; 30static int disable_x86_serial_nr __cpuinitdata = 1;
31static int disable_x86_sep __cpuinitdata;
31 32
32struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; 33struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
33 34
@@ -187,6 +188,14 @@ static int __init x86_fxsr_setup(char * s)
187__setup("nofxsr", x86_fxsr_setup); 188__setup("nofxsr", x86_fxsr_setup);
188 189
189 190
191static int __init x86_sep_setup(char * s)
192{
193 disable_x86_sep = 1;
194 return 1;
195}
196__setup("nosep", x86_sep_setup);
197
198
190/* Standard macro to see if a specific flag is changeable */ 199/* Standard macro to see if a specific flag is changeable */
191static inline int flag_is_changeable_p(u32 flag) 200static inline int flag_is_changeable_p(u32 flag)
192{ 201{
@@ -405,6 +414,10 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
405 clear_bit(X86_FEATURE_XMM, c->x86_capability); 414 clear_bit(X86_FEATURE_XMM, c->x86_capability);
406 } 415 }
407 416
417 /* SEP disabled? */
418 if (disable_x86_sep)
419 clear_bit(X86_FEATURE_SEP, c->x86_capability);
420
408 if (disable_pse) 421 if (disable_pse)
409 clear_bit(X86_FEATURE_PSE, c->x86_capability); 422 clear_bit(X86_FEATURE_PSE, c->x86_capability);
410 423