[POWERPC] Fix off-by-one error in setting decrementer on Book E

Paul Mackerras paulus at samba.org
Wed Oct 31 20:40:02 EST 2007


Sergei Shtylyov writes:

> +       /*
> +        * The "classic"  decrementer  interrupts at 0 to -1 transition, while
> +        * 40x and book E decrementers interrupt  at 1 to  0 transition.

Funky  spacing .  : )

If I take out the removed lines in the rest of your patch, I get:

> +        */
>   #if defined(CONFIG_40x)
>          mtspr(SPRN_PIT, val);
> +#else
> +#if !defined(CONFIG_BOOKE)
> +       val = val ? val - 1 : 0;
> +#endif
> +#if defined(CONFIG_8xx_CPU6)
>          set_dec_cpu6(val);
> +#if defined(CONFIG_PPC_ISERIES)

I think you're missing a #else here.

Paul.



More information about the Linuxppc-dev mailing list