From: Heiko Carstens <hca@linux.ibm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Juergen Christ <jchrist@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Yang Shi <yang@os.amperecomputing.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
David Laight <david.laight.linux@gmail.com>,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [PATCH v4 8/8] s390/percpu: Remove one and two byte this_cpu operation implementation
Date: Fri, 22 May 2026 16:12:57 +0200 [thread overview]
Message-ID: <20260522141257.303617-9-hca@linux.ibm.com> (raw)
In-Reply-To: <20260522141257.303617-1-hca@linux.ibm.com>
There are no one and two byte this_cpu operations within the kernel
(defconfig). However even if there would be, the s390 implementation, which
uses a cmpxchg loop, generates a very large code sequence due to the lack
of native one and two byte cmpxchg instructions.
Remove the s390 implementation and use the generic implementation.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
arch/s390/include/asm/percpu.h | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h
index 667b165b4c0e..5c0c061dbd10 100644
--- a/arch/s390/include/asm/percpu.h
+++ b/arch/s390/include/asm/percpu.h
@@ -51,15 +51,6 @@
new__; \
})
-#define this_cpu_add_1(pcp, val) arch_this_cpu_to_op_simple(pcp, val, +)
-#define this_cpu_add_2(pcp, val) arch_this_cpu_to_op_simple(pcp, val, +)
-#define this_cpu_add_return_1(pcp, val) arch_this_cpu_to_op_simple(pcp, val, +)
-#define this_cpu_add_return_2(pcp, val) arch_this_cpu_to_op_simple(pcp, val, +)
-#define this_cpu_and_1(pcp, val) arch_this_cpu_to_op_simple(pcp, val, &)
-#define this_cpu_and_2(pcp, val) arch_this_cpu_to_op_simple(pcp, val, &)
-#define this_cpu_or_1(pcp, val) arch_this_cpu_to_op_simple(pcp, val, |)
-#define this_cpu_or_2(pcp, val) arch_this_cpu_to_op_simple(pcp, val, |)
-
/*
* Macros to be used for percpu code section based on atomic instructions.
*
@@ -321,8 +312,6 @@ do { \
ret__; \
})
-#define this_cpu_cmpxchg_1(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
-#define this_cpu_cmpxchg_2(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
#define this_cpu_cmpxchg_4(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
#define this_cpu_cmpxchg_8(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
@@ -353,8 +342,6 @@ do { \
ret__; \
})
-#define this_cpu_xchg_1(pcp, nval) arch_this_cpu_xchg(pcp, nval)
-#define this_cpu_xchg_2(pcp, nval) arch_this_cpu_xchg(pcp, nval)
#define this_cpu_xchg_4(pcp, nval) arch_this_cpu_xchg(pcp, nval)
#define this_cpu_xchg_8(pcp, nval) arch_this_cpu_xchg(pcp, nval)
--
2.51.0
next prev parent reply other threads:[~2026-05-22 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 14:12 [PATCH v4 0/8] s390: Improve this_cpu operations Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 1/8] s390/percpu: Infrastructure for more efficient " Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 2/8] s390/percpu: Add missing do { } while (0) constructs Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 3/8] s390/percpu: Use new percpu code section for arch_this_cpu_add() Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 4/8] s390/percpu: Use new percpu code section for arch_this_cpu_add_return() Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 5/8] s390/percpu: Use new percpu code section for arch_this_cpu_[and|or]() Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 6/8] s390/percpu: Provide arch_this_cpu_read() implementation Heiko Carstens
2026-05-22 14:12 ` [PATCH v4 7/8] s390/percpu: Provide arch_this_cpu_write() implementation Heiko Carstens
2026-05-22 14:12 ` Heiko Carstens [this message]
2026-05-22 18:33 ` [PATCH v4 0/8] s390: Improve this_cpu operations David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522141257.303617-9-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david.laight.linux@gmail.com \
--cc=gor@linux.ibm.com \
--cc=jchrist@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sshegde@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=yang@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox