<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/include/asm/bitops.h, branch linux-4.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-10-14T12:32:15Z</updated>
<entry>
<title>s390/bitops: remove 31 bit related comments</title>
<updated>2015-10-14T12:32:15Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2015-10-08T11:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48002bd5af37c3f6ac4a1484427ac52f7f184950'/>
<id>urn:sha1:48002bd5af37c3f6ac4a1484427ac52f7f184950</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/barrier: remove unnecessary serialization in atomics and bitops</title>
<updated>2015-10-14T12:32:07Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2015-09-28T13:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5da7667c035f3a711ec8d0a3997254807dd8bc6d'/>
<id>urn:sha1:5da7667c035f3a711ec8d0a3997254807dd8bc6d</id>
<content type='text'>
The principles of operation states reads are in order, writes are in
order, writes can be reordered after reads, but no reads can be
reordered after writes.

The atomic and bitops variantes for z196 use the interlocked-access
facility instructions with a memory barrier before and after the
instruction. Because of the memory ordering the first barrier is
unnecessary and can be removed.

Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: implement cache friendly test_and_set_bit_lock</title>
<updated>2015-10-14T12:32:06Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2015-08-20T10:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=acdc9fc9a8121ce2ebcd7533bd72852c20b353f3'/>
<id>urn:sha1:acdc9fc9a8121ce2ebcd7533bd72852c20b353f3</id>
<content type='text'>
The generic implementation for test_and_set_bit_lock in include/asm-generic
uses the standard test_and_set_bit operation. This is done with either a
'csg' or a 'loag' instruction. For both version the cache line is fetched
exclusively, even if the bit is already set. The result is an increase in
cache traffic, for a contented lock this is a bad idea.

Acked-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: remove 31 bit support</title>
<updated>2015-03-25T10:49:33Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2015-02-12T12:08:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a79859ae0f35d25c67a03e82bf0c80592f16a39'/>
<id>urn:sha1:5a79859ae0f35d25c67a03e82bf0c80592f16a39</id>
<content type='text'>
Remove the 31 bit support in order to reduce maintenance cost and
effectively remove dead code. Since a couple of years there is no
distribution left that comes with a 31 bit kernel.

The 31 bit kernel also has been broken since more than a year before
anybody noticed. In addition I added a removal warning to the kernel
shown at ipl for 5 minutes: a960062e5826 ("s390: add 31 bit warning
message") which let everybody know about the plan to remove 31 bit
code. We didn't get any response.

Given that the last 31 bit only machine was introduced in 1999 let's
remove the code.
Anybody with 31 bit user space code can still use the compat mode.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops,atomic: add missing memory barriers</title>
<updated>2014-04-01T07:23:35Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2014-03-20T07:55:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ccc8b7ac86053388e793bad20bd26bd777752eb'/>
<id>urn:sha1:0ccc8b7ac86053388e793bad20bd26bd777752eb</id>
<content type='text'>
When reworking the bitops and atomic ops I missed that those instructions
that got atomic behaviour only perform a "specific-operand-serialization"
instead of a full "serialization".
The compare-and-swap instruction used before performs a full serialization
before and after the instruction is executed, which means it has full
memory barrier semantics.
In order to give the new bitops and atomic ops functions also full memory
barrier semantics add a "bcr 14,0" before and after each of those new
instructions which performs full serialization as well.

This restores memory barrier semantics for bitops and atomic ops functions
which return values, like e.g. atomic_add_return(), but not for functions
which do not return a value, like e.g. atomic_add().
This is consistent to other architectures and what common code requires.

Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: fix comment</title>
<updated>2014-02-21T07:50:20Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2014-02-12T11:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db85eaeb52637eb91a7bbc70f6684f5563b983e9'/>
<id>urn:sha1:db85eaeb52637eb91a7bbc70f6684f5563b983e9</id>
<content type='text'>
Fix some numbers in the comments describing the layout of the bit maps.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: rename find_first_bit_left() to find_first_bit_inv()</title>
<updated>2013-10-24T15:16:56Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2013-09-23T10:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d7c7b24e416afb2637be8447e03ca4457c100fd'/>
<id>urn:sha1:7d7c7b24e416afb2637be8447e03ca4457c100fd</id>
<content type='text'>
find_first_bit_left() and friends have nothing to do with the normal
LSB0 bit numbering for big endian machines used in Linux (least
significant bit has bit number 0).
Instead they use MSB0 bit numbering, where the most signficant bit has
bit number 0. So rename find_first_bit_left() and friends to
find_first_bit_inv(), to avoid any confusion.
Also provide inv versions of set_bit, clear_bit and test_bit.

This also removes the confusing use of e.g. set_bit() in airq.c which
uses a "be_to_le" bit number conversion, which could imply that instead
set_bit_le() could be used. But that is entirely wrong since the _le
bitops variant uses yet another bit numbering scheme.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: use flogr instruction to implement __ffs, ffs, __fls, fls and fls64</title>
<updated>2013-10-24T15:16:55Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2013-09-19T09:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1cb7e2b6c3e8758e7406422b66c54c066737977'/>
<id>urn:sha1:b1cb7e2b6c3e8758e7406422b66c54c066737977</id>
<content type='text'>
Since z9 109 we have the flogr instruction which can be used to implement
optimized versions of __ffs, ffs, __fls, fls and fls64.
So implement and use them, instead of the generic variants.
This reduces the size of the kernel image (defconfig, -march=z9-109)
by 19,648 bytes.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: use generic find bit functions / reimplement _left variant</title>
<updated>2013-10-24T15:16:55Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2013-09-18T09:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=746479cdcbb131a0645e8cb4a35d6b26126e3e4c'/>
<id>urn:sha1:746479cdcbb131a0645e8cb4a35d6b26126e3e4c</id>
<content type='text'>
Just like all other architectures we should use out-of-line find bit
operations, since the inline variant bloat the size of the kernel image.
And also like all other architecures we should only supply optimized
variants of the __ffs, ffs, etc. primitives.

Therefore this patch removes the inlined s390 find bit functions and uses
the generic out-of-line variants instead.

The optimization of the primitives follows with the next patch.

With this patch also the functions find_first_bit_left() and
find_next_bit_left() have been reimplemented, since logically, they are
nothing else but a find_first_bit()/find_next_bit() implementation that
use an inverted __fls() instead of __ffs().
Also the restriction that these functions only work on machines which
support the "flogr" instruction is gone now.

This reduces the size of the kernel image (defconfig, -march=z9-109)
by 144,482 bytes.
Alone the size of the function build_sched_domains() gets reduced from
7 KB to 3,5 KB.

We also git rid of unused functions like find_first_bit_le()...

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bitops: optimize set_bit() for constant values</title>
<updated>2013-10-24T15:16:53Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2013-09-17T07:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ae803253e4649803dc6e972bb5e59fc107cf474'/>
<id>urn:sha1:4ae803253e4649803dc6e972bb5e59fc107cf474</id>
<content type='text'>
Since zEC12 we have the interlocked-access facility 2 which allows to
use the instructions ni/oi/xi to update a single byte in storage with
compare-and-swap semantics.
So change set_bit(), clear_bit() and change_bit() to generate such code
instead of a compare-and-swap loop (or using the load-and-* instruction
family), if possible.
This reduces the text segment by yet another 8KB (defconfig).

Alternatively the long displacement variants niy/oiy/xiy could have
been used, but the extended displacement field is usually not needed
and therefore would only increase the size of the text segment again.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
