]> err.no Git - linux-2.6/blobdiff - arch/mips/oprofile/op_model_mipsxx.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / arch / mips / oprofile / op_model_mipsxx.c
index 69a8bcfe72b2bc37a7fd8d0360fd1d70e1ee22fa..1ea5c9c1010b19610943012838f5b9a00fdb5964 100644 (file)
@@ -35,7 +35,7 @@
 #define vpe_id()       smp_processor_id()
 #else
 #define WHAT           0
-#define vpe_id()       smp_processor_id()
+#define vpe_id()       0
 #endif
 
 #define __define_perf_accessors(r, n, np)                              \
@@ -177,7 +177,10 @@ static int mipsxx_perfcount_handler(void)
        unsigned int counters = op_model_mipsxx_ops.num_counters;
        unsigned int control;
        unsigned int counter;
-       int handled = 0;
+       int handled = IRQ_NONE;
+
+       if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26)))
+               return handled;
 
        switch (counters) {
 #define HANDLE_COUNTER(n)                                              \
@@ -188,7 +191,7 @@ static int mipsxx_perfcount_handler(void)
                    (counter & M_COUNTER_OVERFLOW)) {                   \
                        oprofile_add_sample(get_irq_regs(), n);         \
                        w_c0_perfcntr ## n(reg.counter[n]);             \
-                       handled = 1;                                    \
+                       handled = IRQ_HANDLED;                          \
                }
        HANDLE_COUNTER(3)
        HANDLE_COUNTER(2)