<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/asm-x86/bitops_32.h, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-04-26T17:21:17Z</updated>
<entry>
<title>x86: finalize bitops unification</title>
<updated>2008-04-26T17:21:17Z</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-04-04T18:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d66462f5314b0e70ddad8032eb76099475ca5571'/>
<id>urn:sha1:d66462f5314b0e70ddad8032eb76099475ca5571</id>
<content type='text'>
include/asm-x86/bitops_32.h and include/asm-x86/bitops_64.h are now
almost identical. The 64-bit version sets ARCH_HAS_FAST_MULTIPLIER
and has an extra inline function set_bit_string. The define currently
has no influence on the generated code, but it can be argued that
setting it on i386 is the right thing to do anyhow. The addition
of the extra inline function on i386 does not hurt either.

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, UML: remove x86-specific implementations of find_first_bit</title>
<updated>2008-04-26T17:21:17Z</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-04-01T15:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5245698f665c4b7a533dcc47a5afdf33095d436a'/>
<id>urn:sha1:5245698f665c4b7a533dcc47a5afdf33095d436a</id>
<content type='text'>
x86 has been switched to the generic versions of find_first_bit
and find_first_zero_bit, but the original versions were retained.
This patch just removes the now unused x86-specific versions.

also update UML.

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:16Z</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-04-01T09:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
<entry>
<title>x86: merge the simple bitops and move them to bitops.h</title>
<updated>2008-04-26T17:21:16Z</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-03-15T12:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12d9c8420b9daa1da3d9e090640fb24bcd0deba2'/>
<id>urn:sha1:12d9c8420b9daa1da3d9e090640fb24bcd0deba2</id>
<content type='text'>
Some of those can be written in such a way that the same
inline assembly can be used to generate both 32 bit and
64 bit code.

For ffs and fls, x86_64 unconditionally used the cmov
instruction and i386 unconditionally used a conditional
branch over a mov instruction. In the current patch I
chose to select the version based on the availability
of the cmov instruction instead. A small detail here is
that x86_64 did not previously set CONFIG_X86_CMOV=y.

Improved comments for ffs, ffz, fls and variations.

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: change x86 to use generic find_next_bit</title>
<updated>2008-04-26T17:21:16Z</updated>
<author>
<name>Alexander van Heukelum</name>
<email>heukelum@mailshack.com</email>
</author>
<published>2008-03-09T20:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6fd92b63d0626a8fe7eb8e2e50d19ecaa18cb412'/>
<id>urn:sha1:6fd92b63d0626a8fe7eb8e2e50d19ecaa18cb412</id>
<content type='text'>
The versions with inline assembly are in fact slower on the machines I
tested them on (in userspace) (Athlon XP 2800+, p4-like Xeon 2.8GHz, AMD
Opteron 270). The i386-version needed a fix similar to 06024f21 to avoid
crashing the benchmark.

Benchmark using: gcc -fomit-frame-pointer -Os. For each bitmap size
1...512, for each possible bitmap with one bit set, for each possible
offset: find the position of the first bit starting at offset. If you
follow ;). Times include setup of the bitmap and checking of the
results.

		Athlon		Xeon		Opteron 32/64bit
x86-specific:	0m3.692s	0m2.820s	0m3.196s / 0m2.480s
generic:	0m2.622s	0m1.662s	0m2.100s / 0m1.572s

If the bitmap size is not a multiple of BITS_PER_LONG, and no set
(cleared) bit is found, find_next_bit (find_next_zero_bit) returns a
value outside of the range [0, size]. The generic version always returns
exactly size. The generic version also uses unsigned long everywhere,
while the x86 versions use a mishmash of int, unsigned (int), long and
unsigned long.

Using the generic version does give a slightly bigger kernel, though.

defconfig:	   text    data     bss     dec     hex filename
x86-specific:	4738555  481232  626688 5846475  5935cb vmlinux (32 bit)
generic:	4738621  481232  626688 5846541  59360d vmlinux (32 bit)
x86-specific:	5392395  846568  724424 6963387  6a40bb vmlinux (64 bit)
generic:	5392458  846568  724424 6963450  6a40fa vmlinux (64 bit)

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>include/asm-x86/bitops_32.h: checkpatch cleanups - formatting only</title>
<updated>2008-04-17T15:41:21Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2008-03-23T08:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd591acd0f0b2382e8c0a839be9974e7c019bdb6'/>
<id>urn:sha1:fd591acd0f0b2382e8c0a839be9974e7c019bdb6</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: partial unification of asm-x86/bitops.h</title>
<updated>2008-01-30T12:30:55Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2008-01-30T12:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c54d77078056cde0f195b1a982cb681850efc08'/>
<id>urn:sha1:1c54d77078056cde0f195b1a982cb681850efc08</id>
<content type='text'>
This unifies the set/clear/test bit functions of asm/bitops.h.

I have not attempted to merge the bit-finding functions, since they
rely on the machine word size and can't be easily restructured to work
generically without a lot of #ifdefs.  In particular, the 64-bit code
can assume the presence of conditional move instructions, whereas
32-bit needs to be more careful.

The inline assembly for the bit operations has been changed to remove
explicit sizing hints on the instructions, so the assembler will pick
the appropriate instruction forms depending on the architecture and
the context.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>x86: bitops_32.h style cleanups</title>
<updated>2008-01-30T12:30:32Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2008-01-30T12:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec12fa5c80126b252ebcb474d12c832ec4647daa'/>
<id>urn:sha1:ec12fa5c80126b252ebcb474d12c832ec4647daa</id>
<content type='text'>
Coding style cleanups in x86/bitops_32.h:

- drop space in "* addr"
- whitespace &amp; indentation fixes
- spello fixes

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>bitops kernel-doc: inline instead of macro</title>
<updated>2007-10-25T23:16:26Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2007-10-25T21:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb9431eb038caa027cb98cb18576f1a731e56f76'/>
<id>urn:sha1:fb9431eb038caa027cb98cb18576f1a731e56f76</id>
<content type='text'>
Use duplicated inline functions for test_and_set_bit_lock() on x86
instead of #define macros, thus avoiding a bad example.  This allows
kernel-doc to run cleanly instead of terminating with an error:

Error(linux-2.6.24-rc1//include/asm-x86/bitops_32.h:188): cannot understand prototype: 'test_and_set_bit_lock test_and_set_bit '

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86: lock bitops</title>
<updated>2007-10-23T20:37:22Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2007-10-19T05:13:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=418ccbe37f70f5021c4cd1cdcb0ce7f98d05f2dd'/>
<id>urn:sha1:418ccbe37f70f5021c4cd1cdcb0ce7f98d05f2dd</id>
<content type='text'>
I missed an obvious one!

x86 CPUs are defined not to reorder stores past earlier loads, so there is
no hardware memory barrier required to implement a release-consistent store
(all stores are, by definition).

So ditch the generic lock bitops, and implement optimised versions for x86,
which removes the mfence from __clear_bit_unlock (which is already a useful
primitive for SLUB).

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
</feed>
