On Mon, Jan 30, 2006 at 05:06:47PM +0000, Ralf Baechle wrote: > On Sun, Jan 29, 2006 at 07:12:42AM +0000, Stuart Brady wrote: > > > On MIPS, fls() and flz() should probably use CLO. > > It actually uses clz. I know. flz(x) is basically __ilog2(~x), and I still say clo would be better. Removing flz() sounds reasonable, though. > > Curiously, MIPS is the only arch with a flz() function. > > No longer. The fls implementation was based on flz and fls was the only > user of flz. So I cleaned that, once I commit flz will be gone. Not > only a cleanup but also a minor optimization. I'd got that slightly wrong. Yeah, fls(x) returned flz(~x) + 1, which is __ilog2(~~x) + 1. So obviously clz was fine for that, but it needed cleaning up. Shame about popc on SPARC. However, ffz is cheese, regardless of pops. (On sparc64, ffs is too.) I'll wait for the generic bitops patches to be dealt with (or not) and then submit a patch fixing this if needed. Thanks, -- Stuart Brady By the way, I really hope nobody gets ten copies of this, as happened with my last post. It does not seem to be my fault, AFAICS. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: "David S. Miller" <davem@davemloft.net>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- References:
- [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: mita@miraclelinux.com (Akinobu Mita)
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Richard Henderson <rth@twiddle.net>
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Grant Grundler <grundler@parisc-linux.org>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Grant Grundler <grundler@parisc-linux.org>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Stuart Brady <sdbrady@ntlworld.com>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Ralf Baechle <ralf@linux-mips.org>
- [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- Prev by Date: Re: GPL V3 and Linux - Dead Copyright Holders
- Next by Date: Re: 2.6.15.1: UDP fragments >27208 bytes lost with ne2k-pci on DP83815
- Previous by thread: Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- Next by thread: Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- Index(es):
![]() |