lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH -tip] x86: cpu_debug.c prepare report if files are inappropriate or CPU is not supported
    From
    Date
    On Tue, 2009-04-14 at 18:50 +0200, Ingo Molnar wrote:
    > * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
    >
    > > + if (!per_cpu(cpu_modelflag, cpu))
    >
    > hm, on a second look - the whole cpu_model / cpu_modelflag
    > business in arch/x86/kernel/cpu/cpu_debug.c looks
    > over-complicated and broken. You encode it into a
    > 'modelflag':
    >
    > per_cpu(cpu_model, cpu) = ((cpui->x86_vendor << 16) |
    > (cpui->x86 << 8) |
    > (cpui->x86_model));
    >
    > just to decode it later on:
    >
    > flag = per_cpu(cpu_model, cpu);
    >
    > switch (flag >> 16) {
    >
    > That does not make much sense. Please use a proper
    > boot_cpu_data.x86_vendor switch() statement, ok?
    >

    I am using flags for each cpu, in case there are different CPU in the
    sockets:

    struct cpuinfo_x86 *cpui;
    cpui = &cpu_data(cpu);

    Do you still think that boot_cpu_data.x86_vendor is better option in
    case for multiple CPUs.

    --
    JSR



    \
     
     \ /
      Last update: 2009-04-14 19:05    [W:0.027 / U:64.252 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site