Skip to content

Commit

Permalink
x86: add noclflush option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Jan 30, 2008
1 parent 404ee5b commit 191679f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,8 @@ and is between 256 and 4096 characters. It is defined in the file
register save and restore. The kernel will only save
legacy floating-point registers on task switch.

noclflush [BUGS=X86] Don't use the CLFLUSH instruction

nohlt [BUGS=ARM]

no-hlt [BUGS=X86-32] Tells the kernel that the hlt
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,13 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
}
#endif

static __init int setup_noclflush(char *arg)
{
setup_clear_cpu_cap(X86_FEATURE_CLFLSH);
return 1;
}
__setup("noclflush", setup_noclflush);

void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
{
char *vendor = NULL;
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,13 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)

}

static __init int setup_noclflush(char *arg)
{
setup_clear_cpu_cap(X86_FEATURE_CLFLSH);
return 1;
}
__setup("noclflush", setup_noclflush);

void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
{
if (c->x86_model_id[0])
Expand Down

0 comments on commit 191679f

Please sign in to comment.