lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] [6/7] Add noclflush option
    Date

    To disable CLFLUSH usage, especially in change_page_attr().

    Ingo asked for this.

    Signed-off-by: Andi Kleen <ak@suse.de>

    ---
    Documentation/kernel-parameters.txt | 2 ++
    arch/x86/kernel/cpu/common.c | 7 +++++++
    arch/x86/kernel/setup_64.c | 7 +++++++
    3 files changed, 16 insertions(+)

    Index: linux/arch/x86/kernel/cpu/common.c
    ===================================================================
    --- linux.orig/arch/x86/kernel/cpu/common.c
    +++ linux/arch/x86/kernel/cpu/common.c
    @@ -542,6 +542,13 @@ void __cpuinit detect_ht(struct cpuinfo_
    }
    #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;
    Index: linux/arch/x86/kernel/setup_64.c
    ===================================================================
    --- linux.orig/arch/x86/kernel/setup_64.c
    +++ linux/arch/x86/kernel/setup_64.c
    @@ -1042,6 +1042,13 @@ void __cpuinit identify_cpu(struct cpuin
    }
    }

    +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])
    Index: linux/Documentation/kernel-parameters.txt
    ===================================================================
    --- linux.orig/Documentation/kernel-parameters.txt
    +++ linux/Documentation/kernel-parameters.txt
    @@ -1173,6 +1173,8 @@ and is between 256 and 4096 characters.
    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

    \
     
     \ /
      Last update: 2008-01-18 18:33    [W:0.048 / U:180.516 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site