Pull cpuidle into release branch
[pandora-kernel.git] / arch / ia64 / kernel / perfmon_default_smpl.c
index 965d290..a7af1cb 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/init.h>
 #include <asm/delay.h>
 #include <linux/smp.h>
@@ -20,24 +19,17 @@ MODULE_AUTHOR("Stephane Eranian <eranian@hpl.hp.com>");
 MODULE_DESCRIPTION("perfmon default sampling format");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "debug");
-
-MODULE_PARM(debug_ovfl, "i");
-MODULE_PARM_DESC(debug_ovfl, "debug ovfl");
-
-
 #define DEFAULT_DEBUG 1
 
 #ifdef DEFAULT_DEBUG
 #define DPRINT(a) \
        do { \
-               if (unlikely(debug >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
+               if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
        } while (0)
 
 #define DPRINT_ovfl(a) \
        do { \
-               if (unlikely(debug_ovfl >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
+               if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \
        } while (0)
 
 #else
@@ -45,8 +37,6 @@ MODULE_PARM_DESC(debug_ovfl, "debug ovfl");
 #define DPRINT_ovfl(a)
 #endif
 
-static int debug, debug_ovfl;
-
 static int
 default_validate(struct task_struct *task, unsigned int flags, int cpu, void *data)
 {
@@ -54,11 +44,11 @@ default_validate(struct task_struct *task, unsigned int flags, int cpu, void *da
        int ret = 0;
 
        if (data == NULL) {
-               DPRINT(("[%d] no argument passed\n", task->pid));
+               DPRINT(("[%d] no argument passed\n", task_pid_nr(task)));
                return -EINVAL;
        }
 
-       DPRINT(("[%d] validate flags=0x%x CPU%d\n", task->pid, flags, cpu));
+       DPRINT(("[%d] validate flags=0x%x CPU%d\n", task_pid_nr(task), flags, cpu));
 
        /*
         * must hold at least the buffer header + one minimally sized entry
@@ -98,7 +88,7 @@ default_init(struct task_struct *task, void *buf, unsigned int flags, int cpu, v
        hdr->hdr_count        = 0UL;
 
        DPRINT(("[%d] buffer=%p buf_size=%lu hdr_size=%lu hdr_version=%u cur_offs=%lu\n",
-               task->pid,
+               task_pid_nr(task),
                buf,
                hdr->hdr_buf_size,
                sizeof(*hdr),
@@ -255,7 +245,7 @@ default_restart(struct task_struct *task, pfm_ovfl_ctrl_t *ctrl, void *buf, stru
 static int
 default_exit(struct task_struct *task, void *buf, struct pt_regs *regs)
 {
-       DPRINT(("[%d] exit(%p)\n", task->pid, buf));
+       DPRINT(("[%d] exit(%p)\n", task_pid_nr(task), buf));
        return 0;
 }