RTEMS4.7 PPC clock(was Re: IRQ latency, mvme5500 v1.3 )

Sergei Organov osv at topconrd.ru
Wed Aug 17 15:36:44 UTC 2005


Kate Feng <feng1 at bnl.gov> writes:

> I  agree with what Till Straumann suggested for the IRQ handling
> and prioritization of the RTEMS-MVME5500 BSP.  Thanks again.
> 
> However, for the PPC shared file
> c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c
> in RTEMS4.7CVS,  can one  please replace the following:
> 
[...]
> with the same implementation as RTEMS4.6.0 shown below
> until a better algorithm proposed ?
> -------------------------------------------------------------
> void clockIsr(void *unused)
> {
>   PPC_Set_decrementer( Clock_Decrementer_value );
> 
>   Clock_driver_ticks += 1;
> 
>   rtems_clock_tick();
> }
> 
> --------------------------------------------------------------------
> The reason ?
> 
> First, I do not think it's a good idea to disable interrupts
> around the "asm volatile" code either.

Why? There is absolutely no harm in disabling of interrupts for such a
tiny period of time.

> Second,  does the new code fix a bug I am not aware of in 4.6.0 ?
> Perhaps, I did'nt understand the code right or miss some point.

Having the above code from 4.6.0 you may end up having system clock that
is rather inaccurate. I don't think you would buy watches that are that
inaccurate and I expect anybody having such an inaccurate clock on his
PC would be disappointed as well.

-- Sergei.




More information about the users mailing list