Re: [PATCH v3 2/4] s390/jump_label: Implement ARCH_STATIC_BRANCH_JUMP_ASM and ARCH_STATIC_BRANCH_ASM macros

From: Alice Ryhl

Date: Wed May 27 2026 - 01:58:13 EST


On Thu, May 21, 2026 at 06:56:20PM +0200, Jan Polensky wrote:
> Rust static branch support needs the s390 jump label instruction sequence
> and __jump_table emission in a reusable form. The current implementation
> embeds the sequence directly in the C asm goto blocks, which cannot be
> shared with Rust.
>
> Introduce ARCH_STATIC_BRANCH_ASM and ARCH_STATIC_BRANCH_JUMP_ASM to
> describe the brcl sequences for the likely-false and likely-true cases
> and to emit the same __jump_table entries as before. Switch the existing
> C helpers to use the new macros to avoid duplication without changing
> the generated code.
>
> Signed-off-by: Jan Polensky <japo@xxxxxxxxxxxxx>

This looks right.

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Did you test it?

Alice