[XTENSA] Flush the page-address in update-mmu instead of user-address
[pandora-kernel.git] / block / genhd.c
index 5e4ab4b..53f2238 100644 (file)
@@ -337,7 +337,7 @@ static int show_partition(struct seq_file *part, void *v)
        return 0;
 }
 
-struct seq_operations partitions_op = {
+const struct seq_operations partitions_op = {
        .start  = part_start,
        .next   = part_next,
        .stop   = part_stop,
@@ -584,18 +584,34 @@ static int diskstats_show(struct seq_file *s, void *v)
        for (n = 0; n < gp->minors - 1; n++) {
                struct hd_struct *hd = gp->part[n];
 
-               if (hd && hd->nr_sects)
-                       seq_printf(s, "%4d %4d %s %u %u %u %u\n",
-                               gp->major, n + gp->first_minor + 1,
-                               disk_name(gp, n + 1, buf),
-                               hd->ios[0], hd->sectors[0],
-                               hd->ios[1], hd->sectors[1]);
+               if (!hd || !hd->nr_sects)
+                       continue;
+
+               preempt_disable();
+               part_round_stats(hd);
+               preempt_enable();
+               seq_printf(s, "%4d %4d %s %lu %lu %llu "
+                          "%u %lu %lu %llu %u %u %u %u\n",
+                          gp->major, n + gp->first_minor + 1,
+                          disk_name(gp, n + 1, buf),
+                          part_stat_read(hd, ios[0]),
+                          part_stat_read(hd, merges[0]),
+                          (unsigned long long)part_stat_read(hd, sectors[0]),
+                          jiffies_to_msecs(part_stat_read(hd, ticks[0])),
+                          part_stat_read(hd, ios[1]),
+                          part_stat_read(hd, merges[1]),
+                          (unsigned long long)part_stat_read(hd, sectors[1]),
+                          jiffies_to_msecs(part_stat_read(hd, ticks[1])),
+                          hd->in_flight,
+                          jiffies_to_msecs(part_stat_read(hd, io_ticks)),
+                          jiffies_to_msecs(part_stat_read(hd, time_in_queue))
+                       );
        }
  
        return 0;
 }
 
-struct seq_operations diskstats_op = {
+const struct seq_operations diskstats_op = {
        .start  = diskstats_start,
        .next   = diskstats_next,
        .stop   = diskstats_stop,