Machine: Dual-Pentium Pro 200, kernel 2.2.10

I'm working on some experimental modifications to the Linux kernel ( for
soft real-time stuff ) and I have a problem that I hope some guru (
Alan, Mingo ? ) will be able to help.

I'm using the one-shot mode of the local APIC timers, and found that
sometimes I need to update/change the value of the one-shot mode of the
APIC timer of another CPU different from the CPU in which the updating
routine is running. I can do this if the CPU that I want to update is
the current one by using the following code


        tmp_value = apic_read(APIC_LVTT);
        lvtt1_value = APIC_LVT_TIMER_ONE_SHOT | LOCAL_TIMER_VECTOR;
        apic_write(APIC_LVTT , lvtt1_value);        

        /*
         * Divide PICLK by 16
         */
        tmp_value = apic_read(APIC_TDCR);
        apic_write(APIC_TDCR , (tmp_value & ~APIC_TDR_DIV_1 )
                                 | APIC_TDR_DIV_16);

        tmp_value = apic_read(APIC_TMICT);
        apic_write(APIC_TMICT, clocks/APIC_DIVISOR);


which is completely based in the initial calibration of the SMP local
timers. Is there a way to select the APIC timer of a different CPU from
the one that is currently running ? I fear that not ( that I can only
update the APIC timer of the current CPU ), but don't have with me the
APIC manual to verify it.

The reason for this mess is that the updating routines are actually
being executed as part of a Linux timer ( with periods different from
the one-shot ), and because the execution of them are done in the
schedule() routine by any CPU that is there, I cannot verify/force that
the updating CPU is the one that I want.

If more information is required, I'll gladly provide it.  Thanks in
advance,

Hugo

--
Hugo Varotto
Computer Science Dept.
University of Pittsburgh
[EMAIL PROTECTED]
http://www.cs.pitt.edu/FORTS
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to