[PATCH] PowerPC: clockevents and HRT support

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Nov 8 09:36:37 EST 2006


> +#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.

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

Ben.





More information about the Linuxppc-dev mailing list