]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86/oprofile/op_x86_model.h
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / arch / x86 / oprofile / op_x86_model.h
index b83776180c7f0d7b6f321421fcf68241562419b3..ff82a755edd4ad206b3153374371d84a1d77f43a 100644 (file)
@@ -13,7 +13,7 @@
 #define OP_X86_MODEL_H
 
 #include <asm/types.h>
-#include <asm/perf_counter.h>
+#include <asm/perf_event.h>
 
 struct op_msr {
        unsigned long   addr;
@@ -57,6 +57,26 @@ struct op_x86_model_spec {
 
 struct op_counter_config;
 
+static inline void op_x86_warn_in_use(int counter)
+{
+       /*
+        * The warning indicates an already running counter. If
+        * oprofile doesn't collect data, then try using a different
+        * performance counter on your platform to monitor the desired
+        * event. Delete counter #%d from the desired event by editing
+        * the /usr/share/oprofile/%s/<cpu>/events file. If the event
+        * cannot be monitored by any other counter, contact your
+        * hardware or BIOS vendor.
+        */
+       pr_warning("oprofile: counter #%d on cpu #%d may already be used\n",
+                  counter, smp_processor_id());
+}
+
+static inline void op_x86_warn_reserved(int counter)
+{
+       pr_warning("oprofile: counter #%d is already reserved\n", counter);
+}
+
 extern u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
                           struct op_counter_config *counter_config);
 extern int op_x86_phys_to_virt(int phys);