igb: correct issue of set_mta member of mac.ops not being populated
[safe/jmp/linux-2.6] / kernel / time / timer_list.c
index f82c635..a40e20f 100644 (file)
@@ -38,17 +38,12 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
 
 static void print_name_offset(struct seq_file *m, void *sym)
 {
-       unsigned long addr = (unsigned long)sym;
-       char namebuf[KSYM_NAME_LEN+1];
-       unsigned long size, offset;
-       const char *sym_name;
-       char *modname;
-
-       sym_name = kallsyms_lookup(addr, &size, &offset, &modname, namebuf);
-       if (sym_name)
-               SEQ_printf(m, "%s", sym_name);
-       else
+       char symname[KSYM_NAME_LEN];
+
+       if (lookup_symbol_name((unsigned long)sym, symname) < 0)
                SEQ_printf(m, "<%p>", sym);
+       else
+               SEQ_printf(m, "%s", symname);
 }
 
 static void
@@ -70,9 +65,9 @@ print_timer(struct seq_file *m, struct hrtimer *timer, int idx, u64 now)
        SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
 #endif
        SEQ_printf(m, "\n");
-       SEQ_printf(m, " # expires at %Ld nsecs [in %Ld nsecs]\n",
+       SEQ_printf(m, " # expires at %Lu nsecs [in %Ld nsecs]\n",
                (unsigned long long)ktime_to_ns(timer->expires),
-               (unsigned long long)(ktime_to_ns(timer->expires) - now));
+               (long long)(ktime_to_ns(timer->expires) - now));
 }
 
 static void
@@ -116,14 +111,14 @@ print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
 {
        SEQ_printf(m, "  .index:      %d\n",
                        base->index);
-       SEQ_printf(m, "  .resolution: %Ld nsecs\n",
+       SEQ_printf(m, "  .resolution: %Lu nsecs\n",
                        (unsigned long long)ktime_to_ns(base->resolution));
        SEQ_printf(m,   "  .get_time:   ");
        print_name_offset(m, base->get_time);
        SEQ_printf(m,   "\n");
 #ifdef CONFIG_HIGH_RES_TIMERS
-       SEQ_printf(m, "  .offset:     %Ld nsecs\n",
-                       ktime_to_ns(base->offset));
+       SEQ_printf(m, "  .offset:     %Lu nsecs\n",
+                  (unsigned long long) ktime_to_ns(base->offset));
 #endif
        SEQ_printf(m,   "active timers:\n");
        print_active_timers(m, base, now);
@@ -134,16 +129,18 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
        struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
        int i;
 
-       SEQ_printf(m, "\ncpu: %d\n", cpu);
+       SEQ_printf(m, "\n");
+       SEQ_printf(m, "cpu: %d\n", cpu);
        for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
                SEQ_printf(m, " clock %d:\n", i);
                print_base(m, cpu_base->clock_base + i, now);
        }
 #define P(x) \
-       SEQ_printf(m, "  .%-15s: %Ld\n", #x, (u64)(cpu_base->x))
+       SEQ_printf(m, "  .%-15s: %Lu\n", #x, \
+                  (unsigned long long)(cpu_base->x))
 #define P_ns(x) \
-       SEQ_printf(m, "  .%-15s: %Ld nsecs\n", #x, \
-               (u64)(ktime_to_ns(cpu_base->x)))
+       SEQ_printf(m, "  .%-15s: %Lu nsecs\n", #x, \
+                  (unsigned long long)(ktime_to_ns(cpu_base->x)))
 
 #ifdef CONFIG_HIGH_RES_TIMERS
        P_ns(expires_next);
@@ -155,10 +152,11 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
 
 #ifdef CONFIG_TICK_ONESHOT
 # define P(x) \
-       SEQ_printf(m, "  .%-15s: %Ld\n", #x, (u64)(ts->x))
+       SEQ_printf(m, "  .%-15s: %Lu\n", #x, \
+                  (unsigned long long)(ts->x))
 # define P_ns(x) \
-       SEQ_printf(m, "  .%-15s: %Ld nsecs\n", #x, \
-               (u64)(ktime_to_ns(ts->x)))
+       SEQ_printf(m, "  .%-15s: %Lu nsecs\n", #x, \
+                  (unsigned long long)(ktime_to_ns(ts->x)))
        {
                struct tick_sched *ts = tick_get_tick_sched(cpu);
                P(nohz_mode);
@@ -168,11 +166,14 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
                P(idle_calls);
                P(idle_sleeps);
                P_ns(idle_entrytime);
+               P_ns(idle_waketime);
+               P_ns(idle_exittime);
                P_ns(idle_sleeptime);
                P(last_jiffies);
                P(next_jiffies);
                P_ns(idle_expires);
-               SEQ_printf(m, "jiffies: %Ld\n", (u64)jiffies);
+               SEQ_printf(m, "jiffies: %Lu\n",
+                          (unsigned long long)jiffies);
        }
 #endif
 
@@ -186,7 +187,8 @@ print_tickdevice(struct seq_file *m, struct tick_device *td)
 {
        struct clock_event_device *dev = td->evtdev;
 
-       SEQ_printf(m, "\nTick Device: mode:     %d\n", td->mode);
+       SEQ_printf(m, "\n");
+       SEQ_printf(m, "Tick Device: mode:     %d\n", td->mode);
 
        SEQ_printf(m, "Clock Event Device: ");
        if (!dev) {
@@ -194,9 +196,9 @@ print_tickdevice(struct seq_file *m, struct tick_device *td)
                return;
        }
        SEQ_printf(m, "%s\n", dev->name);
-       SEQ_printf(m, " max_delta_ns:   %ld\n", dev->max_delta_ns);
-       SEQ_printf(m, " min_delta_ns:   %ld\n", dev->min_delta_ns);
-       SEQ_printf(m, " mult:           %ld\n", dev->mult);
+       SEQ_printf(m, " max_delta_ns:   %lu\n", dev->max_delta_ns);
+       SEQ_printf(m, " min_delta_ns:   %lu\n", dev->min_delta_ns);
+       SEQ_printf(m, " mult:           %lu\n", dev->mult);
        SEQ_printf(m, " shift:          %d\n", dev->shift);
        SEQ_printf(m, " mode:           %d\n", dev->mode);
        SEQ_printf(m, " next_event:     %Ld nsecs\n",
@@ -269,19 +271,16 @@ static struct file_operations timer_list_fops = {
        .open           = timer_list_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
-       .release        = seq_release,
+       .release        = single_release,
 };
 
 static int __init init_timer_list_procfs(void)
 {
        struct proc_dir_entry *pe;
 
-       pe = create_proc_entry("timer_list", 0644, NULL);
+       pe = proc_create("timer_list", 0644, NULL, &timer_list_fops);
        if (!pe)
                return -ENOMEM;
-
-       pe->proc_fops = &timer_list_fops;
-
        return 0;
 }
 __initcall(init_timer_list_procfs);