Re: [PATCH 2/8] s390/alternatives: remove padding generation code

From: Vasily Gorbik
Date: Fri May 13 2022 - 05:18:32 EST


On Wed, May 11, 2022 at 02:05:26PM +0200, Heiko Carstens wrote:
> clang fails to handle ".if" statements in inline assembly which are heavily
> used in the alternatives code.
>
> To work around this remove this code, and enforce that users of
> alternatives must specify original and alternative instruction sequences
> which have identical sizes. Add a compile time check with two ".org"
> statements similar to arm64.
>
> In result not only clang can handle this, but also quite a lot of code can
> be removed.
>
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/alternative-asm.h | 76 +++-----------------
> arch/s390/include/asm/alternative.h | 93 ++++++-------------------
> arch/s390/kernel/alternative.c | 61 +---------------
> 3 files changed, 31 insertions(+), 199 deletions(-)

Acked-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>