lkml.org 
[lkml]   [2008]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86_64: remove wrong setting about CONSTANT_TSC for intel cpu
    On Mon, Feb 25, 2008 at 11:20 PM, Ingo Molnar <mingo@elte.hu> wrote:
    >
    > * Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
    >
    >
    > > also fix error in early_init_intel and reference about x86_capality,
    > > because it is array already.., prevent possible data corruption...
    >
    > hm, why should there be data corruption:
    >
    >
    > > - set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
    > > + set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
    >
    > cpu_cpu_cap() is currently defined as:
    >
    > #define set_cpu_cap(c, bit) set_bit(bit, (unsigned long *)((c)->x86_capability)
    >
    > which is the same. set_cpu_cap() is indeed the cleaner form to do this
    > so your patch is correct as a cleanup.
    set_cpu_cap is right
    ==
    set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); ===> is wrong
    should be
    set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);

    x86_capability is a array ...

    so this could prevent some data corruption.

    YH


    \
     
     \ /
      Last update: 2008-02-26 08:27    [W:0.020 / U:30.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site