ia64/xen-unstable

changeset 9124:8aa45d7713e3

Clean up PIT-thru-ioapic setup. We don't need the legacy missed-tick
logic and so do not need to keep the PIT enabled thru the 8259 PIC.

Todo: arguable we should sync with x86/64 platform files, assuming they
do not throw out 'recent legacy' stuff (e.g., 32-bit only platforms
like P6). Getting rid of all the 82489DX and 486-era SMP stuff would be
great.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Mar 03 14:10:35 2006 +0100 (2006-03-03)
parents a0c07e32000a
children fab6deef7e87
files xen/arch/x86/io_apic.c xen/arch/x86/time.c xen/include/asm-x86/time.h
line diff
     1.1 --- a/xen/arch/x86/io_apic.c	Fri Mar 03 11:17:09 2006 +0100
     1.2 +++ b/xen/arch/x86/io_apic.c	Fri Mar 03 14:10:35 2006 +0100
     1.3 @@ -1548,8 +1548,9 @@ static inline void check_timer(void)
     1.4       */
     1.5      apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
     1.6      init_8259A(1);
     1.7 -    timer_ack = 1;
     1.8 -    enable_8259A_irq(0);
     1.9 +    /* XEN: Ripped out the legacy missed-tick logic, so below is not needed. */
    1.10 +    /*timer_ack = 1;*/
    1.11 +    /*enable_8259A_irq(0);*/
    1.12  
    1.13      pin1  = find_isa_irq_pin(0, mp_INT);
    1.14      apic1 = find_isa_irq_apic(0, mp_INT);
    1.15 @@ -1617,7 +1618,7 @@ static inline void check_timer(void)
    1.16  
    1.17      printk(KERN_INFO "...trying to set up timer as ExtINT IRQ...");
    1.18  
    1.19 -    timer_ack = 0;
    1.20 +    /*timer_ack = 0;*/
    1.21      init_8259A(0);
    1.22      make_8259A_irq(0);
    1.23      apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
     2.1 --- a/xen/arch/x86/time.c	Fri Mar 03 11:17:09 2006 +0100
     2.2 +++ b/xen/arch/x86/time.c	Fri Mar 03 14:10:35 2006 +0100
     2.3 @@ -41,7 +41,6 @@ boolean_param("hpet_force", opt_hpet_for
     2.4  unsigned long cpu_khz;  /* CPU clock frequency in kHz. */
     2.5  unsigned long hpet_address;
     2.6  spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
     2.7 -int timer_ack = 0;
     2.8  unsigned long volatile jiffies;
     2.9  static u32 wc_sec, wc_nsec; /* UTC time at last 'time update'. */
    2.10  static spinlock_t wc_lock = SPIN_LOCK_UNLOCKED;
    2.11 @@ -148,16 +147,6 @@ void timer_interrupt(int irq, void *dev_
    2.12  {
    2.13      ASSERT(local_irq_is_enabled());
    2.14  
    2.15 -    if ( timer_ack ) 
    2.16 -    {
    2.17 -        extern spinlock_t i8259A_lock;
    2.18 -        spin_lock_irq(&i8259A_lock);
    2.19 -        outb(0x0c, 0x20);
    2.20 -        /* Ack the IRQ; AEOI will end it automatically. */
    2.21 -        inb(0x20);
    2.22 -        spin_unlock_irq(&i8259A_lock);
    2.23 -    }
    2.24 -    
    2.25      /* Update jiffies counter. */
    2.26      (*(unsigned long *)&jiffies)++;
    2.27  
     3.1 --- a/xen/include/asm-x86/time.h	Fri Mar 03 11:17:09 2006 +0100
     3.2 +++ b/xen/include/asm-x86/time.h	Fri Mar 03 14:10:35 2006 +0100
     3.3 @@ -4,8 +4,6 @@
     3.4  
     3.5  #include <asm/msr.h>
     3.6  
     3.7 -extern int timer_ack;
     3.8 -
     3.9  extern void calibrate_tsc_bp(void);
    3.10  extern void calibrate_tsc_ap(void);
    3.11