fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / powerpc / oprofile / op_model_rs64.c
index 5c909ee..19c5ee0 100644 (file)
@@ -102,7 +102,7 @@ static void rs64_reg_setup(struct op_counter_config *ctr,
        /* XXX setup user and kernel profiling */
 }
 
-static void rs64_cpu_setup(void *unused)
+static void rs64_cpu_setup(struct op_counter_config *ctr)
 {
        unsigned int mmcr0;
 
@@ -175,10 +175,13 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
                                  struct op_counter_config *ctr)
 {
        unsigned int mmcr0;
+       int is_kernel;
        int val;
        int i;
        unsigned long pc = mfspr(SPRN_SIAR);
 
+       is_kernel = is_kernel_addr(pc);
+
        /* set the PMM bit (see comment below) */
        mtmsrd(mfmsr() | MSR_PMM);
 
@@ -186,7 +189,7 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
                val = ctr_read(i);
                if (val < 0) {
                        if (ctr[i].enabled) {
-                               oprofile_add_pc(pc, is_kernel_addr(pc), i);
+                               oprofile_add_ext_sample(pc, regs, i, is_kernel);
                                ctr_write(i, reset_value[i]);
                        } else {
                                ctr_write(i, 0);