Acked-by: Segher Boessenkool <seg...@kernel.crashing.org> (But see comments below.)
On Mon, Apr 29, 2019 at 09:08:09AM +0000, Christophe Leroy wrote: > diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c > index bf1de3ca39bc..37cf2af98f6a 100644 > --- a/arch/powerpc/mm/ppc_mmu_32.c > +++ b/arch/powerpc/mm/ppc_mmu_32.c > @@ -101,7 +101,7 @@ static int find_free_bat(void) > static unsigned int block_size(unsigned long base, unsigned long top) > { > unsigned int max_size = (cpu_has_feature(CPU_FTR_601) ? 8 : 256) << 20; > - unsigned int base_shift = (fls(base) - 1) & 31; > + unsigned int base_shift = (ffs(base) - 1) & 31; > unsigned int block_shift = (fls(top - base) - 1) & 31; The code is quite confusing now... Add a comment, or improve it? Segher