]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/oprofile/common.c
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
[linux-2.6-omap-h63xx.git] / arch / mips / oprofile / common.c
index dd2cc42f1b6dc5931638843c45b26f7728f5fa39..c31e4cff64e043437a9019bfeae3890c2ee043eb 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "op_impl.h"
 
-extern struct op_mips_model op_model_mipsxx __attribute__((weak));
-extern struct op_mips_model op_model_rm9000 __attribute__((weak));
+extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak));
+extern struct op_mips_model op_model_rm9000_ops __attribute__((weak));
 
 static struct op_mips_model *model;
 
@@ -27,7 +27,7 @@ static int op_mips_setup(void)
        model->reg_setup(ctr);
 
        /* Configure the registers on all cpus.  */
-       on_each_cpu(model->cpu_setup, 0, 0, 1);
+       on_each_cpu(model->cpu_setup, NULL, 0, 1);
 
         return 0;
 }
@@ -75,12 +75,19 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
        int res;
 
        switch (current_cpu_data.cputype) {
+       case CPU_5KC:
+       case CPU_20KC:
        case CPU_24K:
-               lmodel = &op_model_mipsxx;
+       case CPU_25KF:
+       case CPU_34K:
+       case CPU_74K:
+       case CPU_SB1:
+       case CPU_SB1A:
+               lmodel = &op_model_mipsxx_ops;
                break;
 
        case CPU_RM9000:
-               lmodel = &op_model_rm9000;
+               lmodel = &op_model_rm9000_ops;
                break;
        };
 
@@ -108,5 +115,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
 
 void oprofile_arch_exit(void)
 {
-       model->exit();
+       if (model)
+               model->exit();
 }