2005-11-03 straumanatslacdotstanford.edu

* mpc6xx/clock/c_clock.c: disable interrupts around decrementer update
	to eliminate a race condition
This commit is contained in:
Till Straumann
2005-11-03 18:35:07 +00:00
parent 368aa67e8e
commit cc9073d19b
2 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2005-11-03 straumanatslacdotstanford.edu
* mpc6xx/clock/c_clock.c: disable interrupts around decrementer update
to eliminate a race condition
2005-11-02 straumanatslacdotstanford.edu
* mpc6xx/mmu/pte121.c, mpc6xx/mmu/pte121.h: enhancements to mpc6xx page

View File

@@ -81,7 +81,10 @@ int decr;
* The driver has seen another tick.
*/
do {
register uint32_t flags;
rtems_interrupt_disable(flags);
asm volatile ("mfdec %0; add %0, %0, %1; mtdec %0":"=&r"(decr):"r"(Clock_Decrementer_value));
rtems_interrupt_enable(flags);
Clock_driver_ticks += 1;