<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/arch/s390/include/asm/atomic_ops.h, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-29T11:52:08+00:00</updated>
<entry>
<title>s390: Remove superfluous newlines from inline assemblies</title>
<updated>2025-09-29T11:52:08+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2025-09-25T08:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4335edb7138b45abab65f01d2be77a9be9cfd2fe'/>
<id>urn:sha1:4335edb7138b45abab65f01d2be77a9be9cfd2fe</id>
<content type='text'>
Remove superfluous newlines from inline assemblies. Compilers use the
number of lines of inline assemblies as heuristic for the complexity
and inline decisions. Therefore inline assemblies should only contain
as many lines as required.

A lot of inline assemblies contain a superfluous newline for the last
line. Remove such newlines to improve compiler inlining decisions.

Suggested-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic_ops: Let __atomic_add_const() variants always return void</title>
<updated>2025-03-04T16:34:04+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2025-02-28T14:11:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08d95a12cd28009c2b4673f5f2e2cf65bc8d3402'/>
<id>urn:sha1:08d95a12cd28009c2b4673f5f2e2cf65bc8d3402</id>
<content type='text'>
Depending on MARCH_HAS_Z196_FEATURES __atomic_add_const() returns void or
the previous value before the atomic variant. Make sure that for both cases
void is returned so potential incorrect usage results in both cases in a
compile error.

Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic: Provide arch_atomic_*_and_test() implementations</title>
<updated>2024-12-15T15:19:03+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-12-11T11:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a53f5d247e24f4d3fb1218f23abdb5096488f4cb'/>
<id>urn:sha1:a53f5d247e24f4d3fb1218f23abdb5096488f4cb</id>
<content type='text'>
Provide arch_atomic_*_and_test() implementations which make use of flag
output constraints, and allow the compiler to generate slightly better
code.

Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: Remove superfluous new lines from inline assemblies</title>
<updated>2024-12-15T15:19:03+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-12-11T11:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c7f32c9ee8ecd626dffc28be601b37c111ebd60'/>
<id>urn:sha1:7c7f32c9ee8ecd626dffc28be601b37c111ebd60</id>
<content type='text'>
GCC uses the number of lines of an inline assembly to calculate its length
(number of instructions). This has an impact on GCCs inlining decisions.

Therefore remove superfluous new lines from a couple of inline
assemblies, so that their real size is reflected.

Also use an "asm inline" statement for the fpu_lfpc_safe() inline assembly
to enforce that GCC assumes the minimum size for this inline assembly,
since it contains various statements which make it appear much larger than
the resulting code is.

Suggested-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic: Consistent layering between atomic.h and atomic_ops.h</title>
<updated>2024-12-15T14:13:43+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-12-04T11:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b90c5705786cf0c39356a94b19d842c954fdf16'/>
<id>urn:sha1:9b90c5705786cf0c39356a94b19d842c954fdf16</id>
<content type='text'>
With commit c8a91c285d8c ("s390/atomic: move remaining inline assemblies to
atomic_ops.h") all remaining atomic inline assemblies have been moved to
atomic_ops.h.

However the result is inconsistent: the functions in atomic_ops.h are
supposed to be used with integral types like int and long pointers, while
the functions in atomic.h work with atomic types.

This layering got violated with the named commit. Therefore adjust this
now, and also use consistent variable names in atomic_ops.h.

Reviewed-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic: Remove __atomic_cmpxchg() variants</title>
<updated>2024-11-12T13:01:29+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-11-06T10:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b59f103d3726c35c8715512a5e3451ad778c127c'/>
<id>urn:sha1:b59f103d3726c35c8715512a5e3451ad778c127c</id>
<content type='text'>
With users converted to the standard arch_cmpxchg() variants, remove
the now unused __atomic_cmpxchg() and __atomic_cmpxchg_bool() variants.

Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: Use MARCH_HAS_*_FEATURES defines</title>
<updated>2024-09-07T15:12:42+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-09-04T09:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebcc369f18919c92aeca2003618fcfeade04121b'/>
<id>urn:sha1:ebcc369f18919c92aeca2003618fcfeade04121b</id>
<content type='text'>
Replace CONFIG_HAVE_MARCH_*_FEATURES with MARCH_HAS_*_FEATURES
everywhere so code gets compiled correctly depending on if the
target is the kernel or the decompressor.

Reviewed-by: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic_ops: Disable flag outputs constraint for GCC versions below 14.2.0</title>
<updated>2024-07-23T14:02:31+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-07-22T13:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=13be21f39ab58184fb91844d2242e33805dda40e'/>
<id>urn:sha1:13be21f39ab58184fb91844d2242e33805dda40e</id>
<content type='text'>
GCC may die with an ICE if the flag outputs constraint is used in
combination with other inline assemblies. This will be fixed with
GCC 14.2.0.

Therefore disable the use of the constraint for now.

Link: https://gcc.gnu.org/git?p=gcc.git;a=commit;h=cd11413ff7c4353a3e336db415304f788d23a393
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic_ops: Make use of flag output constraint</title>
<updated>2024-07-10T17:50:44+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-07-01T15:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=279a0164e001a87aa7b9852969ed333c3c69b3aa'/>
<id>urn:sha1:279a0164e001a87aa7b9852969ed333c3c69b3aa</id>
<content type='text'>
With gcc 14.1.0 support for flag output constraint was added for
s390. Use this for __atomic_cmpxchg_bool(). This allows for slightly
better code, since the compiler can generate code depending on the
condition code which is the result of an inline assembly.

The size of the kernel image is reduced by ~12kb.

Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/atomic_ops: Improve __atomic_set() for small values</title>
<updated>2024-07-10T17:50:44+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-07-01T15:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee19370c92f6db4e92e060b5e0c2aa99e4f85408'/>
<id>urn:sha1:ee19370c92f6db4e92e060b5e0c2aa99e4f85408</id>
<content type='text'>
Use mvhi/mvghi for small constant values within the __atomic_set()
inline assemblies. This avoids loading the specified value into a
register.

The size of the kernel image is reduced by ~1.2kb.

Reviewed-by: Juergen Christ &lt;jchrist@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
</feed>
