powerpc/pseries: Duplicate dtl entries sometimes sent to userspace
[pandora-kernel.git] / arch / powerpc / kernel / time.c
index e74f86e..304680a 100644 (file)
@@ -235,8 +235,6 @@ static u64 scan_dispatch_log(u64 stop_tb)
        if (i == vpa->dtl_idx)
                return 0;
        while (i < vpa->dtl_idx) {
-               if (dtl_consumer)
-                       dtl_consumer(dtl, i);
                dtb = dtl->timebase;
                tb_delta = dtl->enqueue_to_dispatch_time +
                        dtl->ready_to_enqueue_time;
@@ -249,6 +247,8 @@ static u64 scan_dispatch_log(u64 stop_tb)
                }
                if (dtb > stop_tb)
                        break;
+               if (dtl_consumer)
+                       dtl_consumer(dtl, i);
                stolen += tb_delta;
                ++i;
                ++dtl;