From c8609416f38fb3d89ca554a4c436c71cbd398681 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Wed, 21 Jan 2004 22:11:46 -0800 Subject: [PATCH] [PATCH] non-integrated local APIC LVTT init compatibility 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 83569f8ab7ed7..cb9539b412f06 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -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); /* -- 2.53.0