<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/bitops.h, branch v2.6.34</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-04-07T15:38:01+00:00</updated>
<entry>
<title>bitops: remove temporary for_each_bit()</title>
<updated>2010-04-07T15:38:01+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2010-04-06T21:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b01d0942c2b7a3026d2b7d38b5773d3d00420e06'/>
<id>urn:sha1:b01d0942c2b7a3026d2b7d38b5773d3d00420e06</id>
<content type='text'>
Migration has been completed so remove this now.  There's one straggler in
linux-next's drivers/mtd/sm_ftl.c.  A patch has been sent.

Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bitops: rename for_each_bit() to for_each_set_bit()</title>
<updated>2010-03-06T19:26:23+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2010-03-05T21:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=984b3f5746ed2cde3d184651dabf26980f2b66e5'/>
<id>urn:sha1:984b3f5746ed2cde3d184651dabf26980f2b66e5</id>
<content type='text'>
Rename for_each_bit to for_each_set_bit in the kernel source tree.  To
permit for_each_clear_bit(), should that ever be added.

The patch includes a macro to map the old for_each_bit() onto the new
for_each_set_bit().  This is a (very) temporary thing to ease the migration.

[akpm@linux-foundation.org: add temporary for_each_bit()]
Suggested-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Artem Bityutskiy &lt;dedekind@infradead.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bitops: Ensure the compile time HWEIGHT is only used for such</title>
<updated>2010-02-04T08:59:50+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-01-29T12:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fce877e3a429940a986e085a41e8b57f2d922e36'/>
<id>urn:sha1:fce877e3a429940a986e085a41e8b57f2d922e36</id>
<content type='text'>
Avoid accidental misuse by failing to compile things

Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;new-submission&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>bitops: Provide compile time HWEIGHT{8,16,32,64}</title>
<updated>2010-01-29T08:01:39+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-01-22T14:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f41699ed067fa695faff8e2e9981b2550abec62'/>
<id>urn:sha1:9f41699ed067fa695faff8e2e9981b2550abec62</id>
<content type='text'>
Provide compile time versions of hweight.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
LKML-Reference: &lt;20100122155535.797688466@chello.nl&gt;
[ Remove some whitespace damage while we are at it ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>bitops: Add __ffs64 bitop</title>
<updated>2009-04-23T09:06:35+00:00</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2009-04-23T07:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=952043ac12a117d8e94bddd9088338d7ad20ca7d'/>
<id>urn:sha1:952043ac12a117d8e94bddd9088338d7ad20ca7d</id>
<content type='text'>
Finds the first set bit in a 64 bit word. This is required in order
to fix a bug in GFS2, but I think it should be a generic function
in case of future users.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux.com&gt;
Reviewed-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>bitmap: find_last_bit()</title>
<updated>2008-12-31T23:42:19+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-12-31T23:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab53d472e785e51fdfc08fc1d66252c1153e6c0f'/>
<id>urn:sha1:ab53d472e785e51fdfc08fc1d66252c1153e6c0f</id>
<content type='text'>
Impact: New API

As the name suggests.  For the moment everyone uses the generic one.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>bitops: remove "optimizations"</title>
<updated>2008-04-29T15:11:16+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-04-29T10:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fee4b19fb3f28d17c0b9f9ea0668db5275697178'/>
<id>urn:sha1:fee4b19fb3f28d17c0b9f9ea0668db5275697178</id>
<content type='text'>
The mapsize optimizations which were moved from x86 to the generic
code in commit 64970b68d2b3ed32b964b0b30b1b98518fde388e increased the
binary size on non x86 architectures.

Looking into the real effects of the "optimizations" it turned out
that they are not used in find_next_bit() and find_next_zero_bit().

The ones in find_first_bit() and find_first_zero_bit() are used in a
couple of places but none of them is a real hot path.

Remove the "optimizations" all together and call the library functions
unconditionally.

Boot-tested on x86 and compile tested on every cross compiler I have.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Avoid divides in BITS_TO_LONGS</title>
<updated>2008-04-29T15:05:59+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2008-04-29T07:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ede9c697bc7513f210103fa77a9031e89726ae40'/>
<id>urn:sha1:ede9c697bc7513f210103fa77a9031e89726ae40</id>
<content type='text'>
BITS_PER_LONG is a signed value (32 or 64)

DIV_ROUND_UP(nr, BITS_PER_LONG) performs signed arithmetic if "nr" is signed too.

Converting BITS_TO_LONGS(nr) to DIV_ROUND_UP(nr, BITS_PER_BYTE *
sizeof(long)) makes sure compiler can perform a right shift, even if "nr"
is a signed value, instead of an expensive integer divide.

Applying this patch saves 141 bytes on x86 when CONFIG_CC_OPTIMIZE_FOR_SIZE=y
and speedup bitmap operations.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86: optimize find_first_bit for small bitmaps</title>
<updated>2008-04-26T17:21:17+00:00</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-04-01T15:42:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a48305028aa38afba93fc05066c71a6ee668ad8'/>
<id>urn:sha1:3a48305028aa38afba93fc05066c71a6ee668ad8</id>
<content type='text'>
Avoid a call to find_first_bit if the bitmap size is know at
compile time and small enough to fit in a single long integer.
Modeled after an optimization in the original x86_64-specific
code.

Signed-off-by: Alexander van Heukelum &lt;heukelum@fastmail.fm&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: generic versions of find_first_(zero_)bit, convert i386</title>
<updated>2008-04-26T17:21:16+00:00</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-04-01T09:46:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77b9bd9c49442407804c37bcc82021a35277f83c'/>
<id>urn:sha1:77b9bd9c49442407804c37bcc82021a35277f83c</id>
<content type='text'>
Generic versions of __find_first_bit and __find_first_zero_bit
are introduced as simplified versions of __find_next_bit and
__find_next_zero_bit. Their compilation and use are guarded by
a new config variable GENERIC_FIND_FIRST_BIT.

The generic versions of find_first_bit and find_first_zero_bit
are implemented in terms of the newly introduced __find_first_bit
and __find_first_zero_bit.

This patch does not remove the i386-specific implementation,
but it does switch i386 to use the generic functions by setting
GENERIC_FIND_FIRST_BIT=y for X86_32.

Signed-off-by: Alexander van Heukelum &lt;heukelum@fastmail.fm&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
