Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-block.git] / arch / x86 / oprofile / op_x86_model.h
index 7b8e75d1608125aa81e7069d781d08bf15052e40..89017fa1fd63bbfa9450f73767690dad26525b7c 100644 (file)
@@ -40,10 +40,10 @@ struct op_x86_model_spec {
        u64             reserved;
        u16             event_mask;
        int             (*init)(struct oprofile_operations *ops);
-       void            (*exit)(void);
-       void            (*fill_in_addresses)(struct op_msrs * const msrs);
+       int             (*fill_in_addresses)(struct op_msrs * const msrs);
        void            (*setup_ctrs)(struct op_x86_model_spec const *model,
                                      struct op_msrs const * const msrs);
+       void            (*cpu_down)(void);
        int             (*check_ctrs)(struct pt_regs * const regs,
                                      struct op_msrs const * const msrs);
        void            (*start)(struct op_msrs const * const msrs);
@@ -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);