lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] x86/oprofile: fix initialization of arch_perfmon for core_i7
    Commit:

    e419294 x86/oprofile: moving arch_perfmon counter setup to op_x86_model_spec.init

    introduced a bug in the initialization of core_i7 leading to the
    incorrect model setup to &op_ppro_spec. This patch fixes this.

    Signed-off-by: Robert Richter <robert.richter@amd.com>
    ---
    arch/x86/oprofile/nmi_int.c | 5 +++--
    1 files changed, 3 insertions(+), 2 deletions(-)

    You may pull the patch from the git repository at:

    git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git master

    The branch also contains the merge with tip/perfcounters-for-linus to
    solve merge conflicts with Linus' tree.

    -Robert

    diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
    index 7826dfc..28ee490 100644
    --- a/arch/x86/oprofile/nmi_int.c
    +++ b/arch/x86/oprofile/nmi_int.c
    @@ -406,6 +406,7 @@ module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0);
    static int __init ppro_init(char **cpu_type)
    {
    __u8 cpu_model = boot_cpu_data.x86_model;
    + struct op_x86_model_spec const *spec = &op_ppro_spec; /* default */

    if (force_arch_perfmon && cpu_has_arch_perfmon)
    return 0;
    @@ -432,7 +433,7 @@ static int __init ppro_init(char **cpu_type)
    *cpu_type = "i386/core_2";
    break;
    case 26:
    - model = &op_arch_perfmon_spec;
    + spec = &op_arch_perfmon_spec;
    *cpu_type = "i386/core_i7";
    break;
    case 28:
    @@ -443,7 +444,7 @@ static int __init ppro_init(char **cpu_type)
    return 0;
    }

    - model = &op_ppro_spec;
    + model = spec;
    return 1;
    }

    --
    1.6.3.1


    \
     
     \ /
      Last update: 2009-06-12 21:27    [W:0.024 / U:0.520 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site