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

2007-10-31 Thread Sergei Shtylyov
Hello. Paul Mackerras wrote: > 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) >>

[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)

2007-10-31 Thread Paul Mackerras
The decrementer in Book E and 4xx processors interrupts on the transition from 1 to 0, rather than on the 0 to -1 transition as on 64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. At the moment we subtract 1 from the count of how many decrementer ticks are required before the next int

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

2007-10-31 Thread Paul Mackerras
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: > +*/

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

2007-10-30 Thread Sergei Shtylyov
Hello. Kumar Gala wrote: >>The decrementer in Book E and 4xx processors interrupts on the >>transition from 1 to 0, rather than on the 0 to -1 transition as on >>64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. >>This fixes the problem by making set_dec subtract 1 from the count for

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

2007-10-29 Thread Kumar Gala
On Oct 28, 2007, at 9:57 PM, Paul Mackerras wrote: > The decrementer in Book E and 4xx processors interrupts on the > transition from 1 to 0, rather than on the 0 to -1 transition as on > 64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. > > This fixes the problem by making set_dec su

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

2007-10-29 Thread Sergei Shtylyov
Hello. Paul Mackerras wrote: > The decrementer in Book E and 4xx processors interrupts on the > transition from 1 to 0, rather than on the 0 to -1 transition as on > 64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. > This fixes the problem by making set_dec subtract 1 from the count

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

2007-10-28 Thread Paul Mackerras
I wrote: > @@ -601,10 +601,8 @@ void timer_interrupt(struct pt_regs * regs) That should be @@ -601,8 +601,6 @@ void timer_interrupt(struct pt_regs * regs) of course. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailm

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

2007-10-28 Thread Olof Johansson
Hi Paul, On Mon, Oct 29, 2007 at 01:57:17PM +1100, Paul Mackerras wrote: > diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h > index f058955..eed64bd 100644 > --- a/include/asm-powerpc/time.h > +++ b/include/asm-powerpc/time.h > @@ -183,6 +183,7 @@ static inline void set_dec(in

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

2007-10-28 Thread Paul Mackerras
The decrementer in Book E and 4xx processors interrupts on the transition from 1 to 0, rather than on the 0 to -1 transition as on 64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors. This fixes the problem by making set_dec subtract 1 from the count for server and classic processors. Si