Subject: Re: [PATCH] PowerPC: clockevents and HRT support

From: Benjamin Herrenschmidt <[email-masked]>
Date: Wed, 08 Nov 2006 09:36:37 +1100

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