]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] non-integrated local APIC LVTT init compatibility
authorMikael Pettersson <mikpe@user.it.uu.se>
Thu, 22 Jan 2004 06:11:46 +0000 (22:11 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 22 Jan 2004 06:11:46 +0000 (22:11 -0800)
Add back the old i82489DX bits to use timer scaling for the old
non-integrated APIC setup.

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

arch/i386/kernel/apic.c

index 83569f8ab7ed7d8339b9cd50ca105d72aa9acc85..cb9539b412f06f88aa8e9282e57f3485885775db 100644 (file)
@@ -834,9 +834,12 @@ void (*wait_timer_tick)(void) = wait_8254_wraparound;
 
 void __setup_APIC_LVTT(unsigned int clocks)
 {
-       unsigned int lvtt_value, tmp_value;
+       unsigned int lvtt_value, tmp_value, ver;
 
+       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);
 
        /*