[PATCH 2.6.21-rt2] PowerPC: decrementer clockevent driver

Sergei Shtylyov sshtylyov at ru.mvista.com
Fri May 18 05:43:45 EST 2007


Segher Boessenkool wrote:
>> +     * We must write a positive value to the decrementer to clear
>> +     * the interrupt on the IBM 970 CPU series.  In periodic mode,
>> +     * this happens when the decrementer gets reloaded later, but
>> +     * in one-shot mode, we have to do it here since an event handler
>> +     * may skip loading the new value...

> Nothing special about 970 here -- on *every* PowerPC,
> a decrementer exception exists as long as the high
> bit of the decrementer equals 1.  BookE is different
> of course.  Some other CPUs might deviate from the
> architecture as well.

    Quoting "PowerPC Operating Environment Architecture":

The Decrementer counts down. On POWER4, a Decrementer exception occurs when 
DEC0 changes from 0 to 1. On POWER4+, operation is as follows.

The exception effects of the Decrementer are said to be consistent with the 
contents of the Decrementer if one of the following statements is true.

* DEC0=0 and a Decrementer exception does not exist.

* DEC0=1 and a Decrementer exception exists.

If DEC0=0, a context synchronizing instruction or event ensures that the 
exception effects of the Decrementer are consistent with the contents of the 
Decrementer. Otherwise, when the contents of DEC0 change, the exception 
effects of the Decrementer become consistent with the new contents of the 
Decrementer reasonably soon after the change.

> Segher

WBR, Sergei



More information about the Linuxppc-dev mailing list