]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: apic - get rid of local_apic_timer_verify_ok
authorCyrill Gorcunov <gorcunov@gmail.com>
Fri, 15 Aug 2008 11:51:22 +0000 (13:51 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 11:51:22 +0000 (13:51 +0200)
We are able to use clock_event_device as it's done in
64bit apic code so lets get rid of local_apic_timer_verify_ok
variable.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_32.c

index a151d66f948c8cbf5abb7c5d7b7c82c3524cd4a4..7783c113be249c82822b5570c57da639d89000e0 100644 (file)
@@ -60,8 +60,6 @@ unsigned long mp_lapic_addr;
 static int force_enable_local_apic;
 int disable_apic;
 
-/* Local APIC timer verification ok */
-static int local_apic_timer_verify_ok;
 /* Disable local APIC timer from the kernel commandline or via dmi quirk */
 static int disable_apic_timer __cpuinitdata;
 /* Local APIC timer works in C2 */
@@ -301,7 +299,7 @@ static void lapic_timer_setup(enum clock_event_mode mode,
        unsigned int v;
 
        /* Lapic used for broadcast ? */
-       if (!local_apic_timer_verify_ok)
+       if (evt->features & CLOCK_EVT_FEAT_DUMMY)
                return;
 
        local_irq_save(flags);
@@ -514,7 +512,7 @@ static int __init calibrate_APIC_clock(void)
                return -1;
        }
 
-       local_apic_timer_verify_ok = 1;
+       levt->features &= ~CLOCK_EVT_FEAT_DUMMY;
 
        /* We trust the pm timer based calibration */
        if (!pm_referenced) {
@@ -548,11 +546,11 @@ static int __init calibrate_APIC_clock(void)
                if (deltaj >= LAPIC_CAL_LOOPS-2 && deltaj <= LAPIC_CAL_LOOPS+2)
                        apic_printk(APIC_VERBOSE, "... jiffies result ok\n");
                else
-                       local_apic_timer_verify_ok = 0;
+                       levt->features |= CLOCK_EVT_FEAT_DUMMY;
        } else
                local_irq_enable();
 
-       if (!local_apic_timer_verify_ok) {
+       if (levt->features & CLOCK_EVT_FEAT_DUMMY) {
                printk(KERN_WARNING
                       "APIC timer disabled due to verification failure.\n");
                        return -1;