diff options
author | Andi Kleen <ak@suse.de> | 2008-01-30 07:33:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:21 -0500 |
commit | 191679fdfa63342752ff6a094a2522ae939b8d0c (patch) | |
tree | d1d3af246c10ff5201450c270fe3bb9f1bd2bd6f | |
parent | 404ee5b14b68d3cba287c2596588b83790c49f7b (diff) |
x86: add noclflush option
To disable CLFLUSH usage, especially in change_page_attr().
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/setup_64.c | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b8fadf5f75a3..040e30a33b7c 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1191,6 +1191,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1191 | register save and restore. The kernel will only save | 1191 | register save and restore. The kernel will only save |
1192 | legacy floating-point registers on task switch. | 1192 | legacy floating-point registers on task switch. |
1193 | 1193 | ||
1194 | noclflush [BUGS=X86] Don't use the CLFLUSH instruction | ||
1195 | |||
1194 | nohlt [BUGS=ARM] | 1196 | nohlt [BUGS=ARM] |
1195 | 1197 | ||
1196 | no-hlt [BUGS=X86-32] Tells the kernel that the hlt | 1198 | no-hlt [BUGS=X86-32] Tells the kernel that the hlt |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index dfc9563fc4f0..56b7ea8e6c79 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -542,6 +542,13 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
542 | } | 542 | } |
543 | #endif | 543 | #endif |
544 | 544 | ||
545 | static __init int setup_noclflush(char *arg) | ||
546 | { | ||
547 | setup_clear_cpu_cap(X86_FEATURE_CLFLSH); | ||
548 | return 1; | ||
549 | } | ||
550 | __setup("noclflush", setup_noclflush); | ||
551 | |||
545 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | 552 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) |
546 | { | 553 | { |
547 | char *vendor = NULL; | 554 | char *vendor = NULL; |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index df159520bbd2..cb9b8a90c094 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -1032,6 +1032,13 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
1032 | 1032 | ||
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | static __init int setup_noclflush(char *arg) | ||
1036 | { | ||
1037 | setup_clear_cpu_cap(X86_FEATURE_CLFLSH); | ||
1038 | return 1; | ||
1039 | } | ||
1040 | __setup("noclflush", setup_noclflush); | ||
1041 | |||
1035 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | 1042 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) |
1036 | { | 1043 | { |
1037 | if (c->x86_model_id[0]) | 1044 | if (c->x86_model_id[0]) |