Re: [PATCH v2 12/12] s390/preempt: Enable HAS_SEPARATE_PREEMPT_RESCHED_BITS
From: Peter Zijlstra
Date: Thu May 28 2026 - 06:54:12 EST
On Tue, May 26, 2026 at 08:21:48AM -0700, Boqun Feng wrote:
> From: Heiko Carstens <hca@xxxxxxxxxxxxx>
>
> Convert s390's preempt_count to 64 bit, and change the preempt
> primitives accordingly.
>
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> Signed-off-by: Boqun Feng <boqun@xxxxxxxxxx>
> Link: https://patch.msgid.link/20260509181249.16281C67-hca@xxxxxxxxxxxxx
> ---
> arch/s390/Kconfig | 1 +
> arch/s390/include/asm/lowcore.h | 13 +++++++----
> arch/s390/include/asm/preempt.h | 41 +++++++++++++++------------------
> 3 files changed, 29 insertions(+), 26 deletions(-)
>
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index ecbcbb781e40..cbbca82f8443 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -276,6 +276,7 @@ config S390
> select PCI_MSI if PCI
> select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
> select PCI_QUIRKS if PCI
> + select HAS_SEPARATE_PREEMPT_RESCHED_BITS
> select SPARSE_IRQ
> select SWIOTLB
> select SYSCTL_EXCEPTION_TRACE
> diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
> index 50ffe75adeb4..0974ab278169 100644
> --- a/arch/s390/include/asm/lowcore.h
> +++ b/arch/s390/include/asm/lowcore.h
> @@ -160,10 +160,15 @@ struct lowcore {
> /* SMP info area */
> __u32 cpu_nr; /* 0x03a0 */
> __u32 softirq_pending; /* 0x03a4 */
> - __s32 preempt_count; /* 0x03a8 */
> - __u32 spinlock_lockval; /* 0x03ac */
> - __u32 spinlock_index; /* 0x03b0 */
> - __u8 pad_0x03b4[0x03b8-0x03b4]; /* 0x03b4 */
> + union {
> + struct {
> + __u32 need_resched; /* 0x03a8 */
> + __u32 count; /* 0x03ac */
> + } preempt;
> + __u64 preempt_count; /* 0x03a8 */
> + };
I'm a little confused by this union; afaict it isn't actually used.