x86: Conditionally update time when ack-ing pending irqs
[pandora-kernel.git] / arch / x86 / kernel / apic / apic.c
index c4e3581..0392927 100644 (file)
@@ -1309,11 +1309,13 @@ void __cpuinit setup_local_APIC(void)
                               acked);
                        break;
                }
-               if (cpu_has_tsc) {
-                       rdtscll(ntsc);
-                       max_loops = (cpu_khz << 10) - (ntsc - tsc);
-               } else
-                       max_loops--;
+               if (queued) {
+                       if (cpu_has_tsc) {
+                               rdtscll(ntsc);
+                               max_loops = (cpu_khz << 10) - (ntsc - tsc);
+                       } else
+                               max_loops--;
+               }
        } while (queued && max_loops > 0);
        WARN_ON(max_loops <= 0);