CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/01/14 00:58:31
Modified files:
arch/mips/oprofile: common.c op_model_rm9000.c
Log message:
Resurrect oprofile after all the damage done by -rc1.
diff -urN linux/arch/mips/oprofile/common.c linux/arch/mips/oprofile/common.c
--- linux/arch/mips/oprofile/common.c 2004/12/12 02:22:46 1.1
+++ linux/arch/mips/oprofile/common.c 2005/01/14 00:58:31 1.2
@@ -67,18 +67,9 @@
on_each_cpu(model->cpu_stop, NULL, 0, 1);
}
-static struct oprofile_operations oprof_mips_ops = {
- .create_files = op_mips_create_files,
- .setup = op_mips_setup,
- .start = op_mips_start,
- .stop = op_mips_stop,
- .cpu_type = NULL
-};
-
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
{
struct op_mips_model *lmodel = NULL;
- int res;
switch (current_cpu_data.cputype) {
case CPU_RM9000:
@@ -87,21 +78,21 @@
};
if (!lmodel)
- return -ENODEV;
+ return;
- res = lmodel->init();
- if (res)
- return res;
+ if (lmodel->init())
+ return;
model = lmodel;
- oprof_mips_ops.cpu_type = lmodel->cpu_type;
- *ops = &oprof_mips_ops;
+ ops->create_files = op_mips_create_files;
+ ops->setup = op_mips_setup;
+ ops->start = op_mips_start;
+ ops->stop = op_mips_stop;
+ ops->cpu_type = lmodel->cpu_type;
printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
lmodel->cpu_type);
-
- return 0;
}
void oprofile_arch_exit(void)
diff -urN linux/arch/mips/oprofile/op_model_rm9000.c
linux/arch/mips/oprofile/op_model_rm9000.c
--- linux/arch/mips/oprofile/op_model_rm9000.c 2004/12/15 20:30:48 1.2
+++ linux/arch/mips/oprofile/op_model_rm9000.c 2005/01/14 00:58:31 1.3
@@ -99,13 +99,11 @@
counter2 = counters >> 32;
if (control & RM9K_COUNTER1_OVERFLOW) {
- oprofile_add_sample(regs->cp0_epc, !user_mode(regs),
- 0, smp_processor_id());
+ oprofile_add_sample(regs, 0);
counter1 = reg.reset_counter1;
}
if (control & RM9K_COUNTER2_OVERFLOW) {
- oprofile_add_sample(regs->cp0_epc, !user_mode(regs),
- 1, smp_processor_id());
+ oprofile_add_sample(regs, 1);
counter2 = reg.reset_counter2;
}
|