Re: Re[2]: [PATCH] fork_init: fix division by zero

2008-12-10 Thread Paul Mackerras
David Howells writes: > Ummm... On powerpc, I believe rotate-left would be a division as it does the > bit-numbering and the bit direction the opposite way to more familiar CPUs > such as x86. No. :) "Left" and "right" are relative to the way those of us humans in the Western European cultural

Re: Re[2]: [PATCH] fork_init: fix division by zero

2008-12-10 Thread Geert Uytterhoeven
On Wed, 10 Dec 2008, David Howells wrote: > Yuri Tikhonov <[EMAIL PROTECTED]> wrote: > > In any case, adding braces as follows probably would be better: > > > > + max_threads = mempages * (PAGE_SIZE / (8 * THREAD_SIZE)); > > I think you mean brackets, not braces '{}'. > > > Right ? > > De

Re: Re[2]: [PATCH] fork_init: fix division by zero

2008-12-10 Thread David Howells
David Howells <[EMAIL PROTECTED]> wrote: > Ummm... On powerpc, I believe rotate-left would be a division as it does the > bit-numbering and the bit direction the opposite way to more familiar CPUs > such as x86. Actually, I'm not sure that's true. Sometimes powerpc makes my head hurt:-) David

Re: Re[2]: [PATCH] fork_init: fix division by zero

2008-12-10 Thread David Howells
Yuri Tikhonov <[EMAIL PROTECTED]> wrote: > Here we believe in preprocessor: since all PAGE_SIZE, 8, and > THREAD_SIZE are the constants we expect it will calculate this. The preprocessor shouldn't be calculating this. I believe it will _only_ calculate expressions for #if. In the situation yo