Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-05 Thread Hans Petter Selasky
Done. See r275507 . --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-05 Thread Dag-Erling Smørgrav
Hans Petter Selasky writes: > I see. Who can update the cpufunc.h header file to use the builtins? Ask someone involved with porting FreeBSD to that platform. > Are these also available with GCC? They are enabled unconditionally for amd64 and i386. They may or may not be compiler-dependent on

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-05 Thread Dag-Erling Smørgrav
Hans Petter Selasky writes: > Is ffs() available in the loader too? Because this code is also built > for the loader? I guess I could figure this out myself though ... The loader usues libkern, so yes. But it's easy enough to check - just modify the code to use ffs() and see if it builds. DES -

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-05 Thread Hans Petter Selasky
On 12/05/14 10:33, Dag-Erling Smørgrav wrote: John-Mark Gurney writes: So this says that you think it should be using the builtin, yet when I suggested it, you say no? Which is it? Use ffs(), let libkern worry about how it's implemented. DES Hi, One more question. Is ffs() available in

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-05 Thread Dag-Erling Smørgrav
John-Mark Gurney writes: > So this says that you think it should be using the builtin, yet when I > suggested it, you say no? Which is it? Use ffs(), let libkern worry about how it's implemented. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-a

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread Hans Petter Selasky
On 12/04/14 18:50, John-Mark Gurney wrote: Hans Petter Selasky wrote this message on Thu, Dec 04, 2014 at 08:21 +0100: On 12/04/14 01:54, John-Mark Gurney wrote: Hans Petter Selasky wrote this message on Wed, Dec 03, 2014 at 21:55 +: Author: hselasky Date: Wed Dec 3 21:55:44 2014 New Revi

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread John-Mark Gurney
Dag-Erling Smrgrav wrote this message on Thu, Dec 04, 2014 at 19:28 +0100: > John-Mark Gurney writes: > > Did you see the comment about usig __builtin_ffs{,l,ll} instead? this > > seems to be a better route... > > No. It's needlessly compiler-dependent. I'm confused, in an earlier email you sai

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread Dag-Erling Smørgrav
John-Mark Gurney writes: > Did you see the comment about usig __builtin_ffs{,l,ll} instead? this > seems to be a better route... No. It's needlessly compiler-dependent. > So, how about changing libkern.h to define the various ones to the > built in, and dropping all the special versions? This

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread John-Mark Gurney
Hans Petter Selasky wrote this message on Thu, Dec 04, 2014 at 08:21 +0100: > On 12/04/14 01:54, John-Mark Gurney wrote: > >Hans Petter Selasky wrote this message on Wed, Dec 03, 2014 at 21:55 +: > >>Author: hselasky > >>Date: Wed Dec 3 21:55:44 2014 > >>New Revision: 275468 > >>URL: https://s

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread Dag-Erling Smørgrav
Dimitry Andric writes: > Maybe it is easier to alias ffs() and friends to __builtin_ffs(), > since the compilers we support have these builtins already. That should already be the case on platforms that support it. There is absolutely no reason to hand-roll an ffs() equivalent. (unfortunately,

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-04 Thread Dimitry Andric
On 04 Dec 2014, at 01:54, John-Mark Gurney wrote: > > Hans Petter Selasky wrote this message on Wed, Dec 03, 2014 at 21:55 +: >> Author: hselasky >> Date: Wed Dec 3 21:55:44 2014 >> New Revision: 275468 >> URL: https://svnweb.freebsd.org/changeset/base/275468 >> >> Log: >> Optimise the bit

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-03 Thread Hans Petter Selasky
On 12/04/14 01:54, John-Mark Gurney wrote: Hans Petter Selasky wrote this message on Wed, Dec 03, 2014 at 21:55 +: Author: hselasky Date: Wed Dec 3 21:55:44 2014 New Revision: 275468 URL: https://svnweb.freebsd.org/changeset/base/275468 Log: Optimise the bit searching loops, by quickly

Re: svn commit: r275468 - head/sys/dev/usb/controller

2014-12-03 Thread John-Mark Gurney
Hans Petter Selasky wrote this message on Wed, Dec 03, 2014 at 21:55 +: > Author: hselasky > Date: Wed Dec 3 21:55:44 2014 > New Revision: 275468 > URL: https://svnweb.freebsd.org/changeset/base/275468 > > Log: > Optimise the bit searching loops, by quickly skipping the 16 first set > bit

svn commit: r275468 - head/sys/dev/usb/controller

2014-12-03 Thread Hans Petter Selasky
Author: hselasky Date: Wed Dec 3 21:55:44 2014 New Revision: 275468 URL: https://svnweb.freebsd.org/changeset/base/275468 Log: Optimise the bit searching loops, by quickly skipping the 16 first set bits if all the 16 first bits are set. This way the worst case searching time is reduced from