From: Prarit Bhargava <prarit@redhat.com> Date: Thu, 22 Apr 2010 14:59:56 -0400 Subject: [misc] io_apic: skip timer_irq_works check when on VMware Message-id: <20100422145956.1086.45273.sendpatchset@prarit.bos.redhat.com> Patchwork-id: 24588 O-Subject: [RHEL5 PATCH]: Skip the timer_irq_works check when on VMware Bugzilla: 575309 RH-Acked-by: Zachary Amsden <zamsden@redhat.com> >From the BZ: "Skip the timer_irq_works check when on VMware. Description of problem: We are hitting the IO-APIC + timer bug (a.k.a pester mingo on mainline) with the RHEL 5.4 32bit kernel at bootup. The problem is specific to virtualization since in some cases the hypervisor can be de-scheduled when the kernel is doing the timer_irq_works call, as a result the TSC and jiffies values can go out of sync. This is more prominent on VMware since we enable the LazyTimerEmulation mode for 32bit kernels on VMware platform for 5.4 kernel (as part of PR 463573). Since this problem is VMware specific, I have added a condition to skip the timer_irq_works call when running on VMware platform. Please note that this problem is not prominent on mainline kernel since the PIT is not used to drive timekeeping interrupts on those kernels as a result we don't have to enter the LazyTimerEmulation mode for correct timekeeping over there." Successfully compiled by me (Prarit). Resolves BZ 575309. Signed-off-by: Jarod Wilson <jarod@redhat.com> diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 2364d1d..848d531 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -38,6 +38,7 @@ #include <asm/timer.h> #include <asm/i8259.h> #include <asm/nmi.h> +#include <asm/vmware.h> #include <mach_apic.h> @@ -1875,6 +1876,9 @@ static int __init timer_irq_works(void) unsigned long t1 = jiffies; unsigned long flags; + if (vmware_platform()) + return 1; + local_save_flags(flags); local_irq_enable(); /* Let ten ticks pass... */