[PATCH][2.6] local APIC LVTT init bug

From: Mikael Pettersson (mikpe_at_user.it.uu.se)
Date: 01/22/04

  • Next message: Aaron Mulder: "Re: Strange pauses in 2.6.2-rc1 / AMD64"
    Date:	Thu, 22 Jan 2004 20:32:49 +0100
    To: torvalds@osdl.org
    
    

    __setup_APIC_LVTT() incorrectly sets i82489DX-only bits
    which are reserved in integrated local APICs, causing
    problems in some machines. Fixed in this patch by making
    this setting conditional.

    It's possible these bits don't need to be set on i82489DXs,
    but not having this HW for testing I elected to maintain
    our current behaviour on these old machines.

    /Mikael

    diff -ruN linux-2.6.2-rc1/arch/i386/kernel/apic.c linux-2.6.2-rc1.apic-lvtt-init-fix/arch/i386/kernel/apic.c
    --- linux-2.6.2-rc1/arch/i386/kernel/apic.c 2003-10-18 11:59:45.000000000 +0200
    +++ linux-2.6.2-rc1.apic-lvtt-init-fix/arch/i386/kernel/apic.c 2004-01-22 19:57:37.691617134 +0100
    @@ -834,11 +834,13 @@
     
     void __setup_APIC_LVTT(unsigned int clocks)
     {
    - unsigned int lvtt1_value, tmp_value;
    + unsigned int lvtt_value, tmp_value, ver;
     
    - lvtt1_value = SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV) |
    - APIC_LVT_TIMER_PERIODIC | LOCAL_TIMER_VECTOR;
    - apic_write_around(APIC_LVTT, lvtt1_value);
    + ver = GET_APIC_VERSION(apic_read(APIC_LVR));
    + lvtt_value = APIC_LVT_TIMER_PERIODIC | LOCAL_TIMER_VECTOR;
    + if (!APIC_INTEGRATED(ver))
    + lvtt_value |= SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV);
    + apic_write_around(APIC_LVTT, lvtt_value);
     
             /*
              * Divide PICLK by 16
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Aaron Mulder: "Re: Strange pauses in 2.6.2-rc1 / AMD64"

    Relevant Pages

    • Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver
      ... [Without any Logical Partitions] ... virtual and real consoles connected to certain kind of machines. ... But as stated by you this patch might cause lot of inconvenience to other user. ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [PATCH 3/3] Add disk hotswap support to libata RESEND #5
      ... Lukasz Kosewski wrote: ... > Patch 3/3 for libata hotswapping, ... Seems to be working on UP machines (heavy, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: keyboard problem with 2.6.6
      ... e.g. try my keyboard driver across 2 machines (using the SERIO_USERDEV ... The patch is here: ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH] ACPI pci irq routing fix
      ... anything from the from the _PRS list, as some machines don't handle this ... This patch is against current linux-acpi-test-2.6.0. ... /* Attempt to enable the link device at this IRQ. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 3/3] Add disk hotswap support to libata RESEND #5
      ... Patch 3/3 for libata hotswapping, ... Seems to be working on UP machines (heavy, ... testing) and SMP ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)