[PATCH] PowerPC: clockevents and HRT support

Sergei Shtylyov sshtylyov at ru.mvista.com
Wed Nov 8 09:44:40 EST 2006


Hello.

Benjamin Herrenschmidt wrote:

>>+#ifdef CONFIG_PPC_MULTIPLATFORM
>>+	/*
>>+	 * 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...
>>+	 */
>>+	if (per_cpu(decrementers, cpu).mode != CLOCK_EVT_PERIODIC)
>>+		set_dec(DECREMENTER_MAX);
>>+#endif

> PPC_MULTIPLATFORM is going away soon (or will be set for all CPU types
> in arch/powerpc). Just make up a macro at the top of the file around the
> lines of

> #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> #define PPC_BOOKE_DECREMENTER
> #endif

> And use #if(n)def PPC_BOOKE_DECREMENTER in the rest of the code.

    That's not equivalent. What I wanted to cover with this option was 970 
weirdness of the decrementer interrupts being level triggered and effectively 
tied to the MSB of the decremeneter register...
    Also, 40x decrementer is not Book E compatible.

> Also, what's the problem with ppc64 deterministic accounting that you
> can't fix it ?

    Arch-specific accounting hooks which this feature makes use of can't be 
called from the generic clockevents code.

> Ben.

WBR, Sergei



More information about the Linuxppc-dev mailing list