From mboxrd@z Thu Jan 1 00:00:00 1970 From: Klaas Zweck Subject: timer on just one cpu in linux mp-system Date: Thu, 18 Apr 2002 00:25:07 +0200 Sender: linux-smp-owner@vger.kernel.org Message-ID: <3CBDF643.4010103@tzi.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-smp hi, my question is how to make a linux mp-kernel react on timer interrupts on just _one_ cpu? my system is a pentium3 smp computer with a serverworks chipset. boot.msg says: >Intel MultiProcessor Specification v1.4 <4> Virtual Wire compatibility mode. <4>OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000 <4>Processor #3 Pentium(tm) Pro APIC version 17 <4> Floating point unit present. <4> Machine Exception supported. <4> 64 bit compare & exchange supported. <4> Internal APIC present. <4> SEP present. <4> MTRR present. <4> PGE present. <4> MCA present. <4> CMOV present. <4> PAT present. <4> PSE present. <4> PSN present. <4> MMX present. <4> FXSR present. <4> XMM present. <4> Bootup CPU and so for the second cpu (except for the bootup cpu line) cat /proc/interrupts says that timer interrupt is number 0 and it is always counted on both cpus. (they diifer slightly but both counters are updated ) example of cat /proc/interrupts CPU0 CPU1 0: 105123 96263 IO-APIC-edge timer in the function setup_local_APIC() in arch/i386/kernel/apic.c i did the following to (try) to disable timer interrupt on cpu1: if ( smp_processor_id() ){ lvtt1_value = SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV) | APIC_LVT_TIMER_PERIODIC | LOCAL_TIMER_VECTOR; ---> lvtt1_value = lvtt1_value | APIC_LVT_MASKED; printk( "KHZ: Write to AP local APIC (Timer) %x \n", lvtt1_value ); } else { lvtt1_value = SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV) | APIC_LVT_TIMER_PERIODIC | LOCAL_TIMER_VECTOR; printk( "KHZ: Write to BP local APIC (Timer) %x \n", lvtt1_value ); } ---> means my try to mask the timer interrupt for any but the boot cpu. ( since the boot cpu has smp_processor_id() zero ). but it didn't work since cat /proc/interrupts still reports timer interrupts on both cpus. even calling clear_local_APIC() at the end of setup_local_APIC() (both in arch/i386/kernel/apic.c) which should set all local apic local vector table (LVT) entries to masked state didn't work. still cat /proc/interrupts reports timer irqs on both cpus. what am i doing wrong ?? thanks and greetings, klaas