From: sashiko-bot@kernel.org
To: "Heiko Carstens" <hca@linux.ibm.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v4 04/11] s390/percpu: Let MVIY_PERCPU() calculate alternative displacement
Date: Mon, 21 Sep 2026 16:15:00 +0000 [thread overview]
Message-ID: <20260921161500.882DD1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921155806.2447506-5-hca@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] s390/percpu: incomplete refactoring in arch_raw_cpu_ptr()
--
commit 7a99372f1f5c810f33cd0d340f3c23eb3cf46f5f
Author: Heiko Carstens <hca@linux.ibm.com>
s390/percpu: Let MVIY_PERCPU() calculate alternative displacement
This commit updates the percpu inline assemblies to calculate the alternative
lowcore displacement directly within the assembly string using LC_ALT_ADDR.
This removes the need to repeatedly pass the same alternative displacement
values as constraints, making the code more readable.
> diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h
> index 9888b38dedab2..3bc448c4c2dd7 100644
> --- a/arch/s390/include/asm/percpu.h
> +++ b/arch/s390/include/asm/percpu.h
[ ... ]
> -#define AG_ALT(disp, dispalt, reg) \
> - ALTERNATIVE(" ag " reg ", " disp "(%%r0)\n", \
> - " ag " reg ", " dispalt "(%%r0)\n", \
> +#define AG_ALT(disp, reg) \
> + ALTERNATIVE(" ag " reg ", " disp "(%%r0)\n", \
> + " ag " reg ", " disp "+" LC_ALT_ADDR "(%%r0)\n", \
> ALT_FEATURE(MFEATURE_LOWCORE))
[Severity: Low]
Does this refactoring miss arch_raw_cpu_ptr() which is defined earlier in
the same file?
Looking at arch_raw_cpu_ptr(), it still uses an ALTERNATIVE block that passes
LOWCORE_ALT_ADDRESS manually:
arch/s390/include/asm/percpu.h:arch_raw_cpu_ptr()
asm_inline volatile(
ALTERNATIVE("ag %[__ptr__],%[offzero](%%r0)\n",
"ag %[__ptr__],%[offalt](%%r0)\n",
ALT_FEATURE(MFEATURE_LOWCORE))
: [__ptr__] "+d" (tcp_ptr__)
: [offzero] "i" (lc_percpu),
[offalt] "i" (lc_percpu + LOWCORE_ALT_ADDRESS),
Could this be updated to use the new LC_ALT_ADDR calculation strategy for
consistency?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921155806.2447506-1-hca@linux.ibm.com?part=4
next prev parent reply other threads:[~2026-09-21 16:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 15:57 [PATCH v4 00/11] s390: More this_cpu_*() changes Heiko Carstens
2026-09-21 15:57 ` [PATCH v4 01/11] s390/percpu: Fix comment typo Heiko Carstens
2026-09-21 16:00 ` sashiko-bot
2026-09-21 15:57 ` [PATCH v4 02/11] s390/percpu: Add sanity check to GEN_MVIY macro Heiko Carstens
2026-09-21 16:03 ` sashiko-bot
2026-09-21 15:57 ` [PATCH v4 03/11] s390/lowcore: Remove _AC() from LOWCORE_ALT_ADDRESS Heiko Carstens
2026-09-21 16:07 ` sashiko-bot
2026-09-21 15:57 ` [PATCH v4 04/11] s390/percpu: Let MVIY_PERCPU() calculate alternative displacement Heiko Carstens
2026-09-21 16:15 ` sashiko-bot [this message]
2026-09-21 15:57 ` [PATCH v4 05/11] s390/percpu/lowcore: Add and use LC_PERCPU lowcore offset defines Heiko Carstens
2026-09-21 16:18 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 06/11] s390/percpu: Rename inline assembly symbolic names Heiko Carstens
2026-09-21 16:19 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 07/11] s390/percpu: Use __PCPU_BEGIN() and __PCPU_END() for inline assemblies Heiko Carstens
2026-09-21 16:23 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 08/11] s390/percpu: Use percpu code section for this_cpu_cmpxchg128() Heiko Carstens
2026-09-21 16:29 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 09/11] s390/percpu: Use percpu code section for this_cpu_xchg() Heiko Carstens
2026-09-21 16:34 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 10/11] s390/percpu: Use percpu code section for this_cpu_cmpxchg() Heiko Carstens
2026-09-21 16:42 ` sashiko-bot
2026-09-21 15:58 ` [PATCH v4 11/11] s390/percpu: Rework to simplify percpu_entry() and percpu_exit() Heiko Carstens
2026-09-21 16:48 ` sashiko-bot
2026-09-22 15:37 ` [PATCH v4 00/11] s390: More this_cpu_*() changes Mete Durlu
2026-09-22 18:22 ` Heiko Carstens
2026-09-23 6:02 ` Mete Durlu
2026-09-26 6:53 ` Alexander Gordeev
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=20260921161500.882DD1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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