Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / x86 / kernel / apic / apic.c
index a5241b209ea5c726c522247a583fd598338ded0c..1bd91cb7b320a2363097374cd9264005e39b04a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  *     Local APIC handling, local APIC timers
  *
@@ -1492,7 +1493,8 @@ static void apic_pending_intr_clear(void)
                if (queued) {
                        if (boot_cpu_has(X86_FEATURE_TSC) && cpu_khz) {
                                ntsc = rdtsc();
-                               max_loops = (cpu_khz << 10) - (ntsc - tsc);
+                               max_loops = (long long)cpu_khz << 10;
+                               max_loops -= ntsc - tsc;
                        } else {
                                max_loops--;
                        }