All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Jonas Paulsson <paulsson@linux.vnet.ibm.com>,
	Ulrich Weigand <ulrich.weigand@de.ibm.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Alexander Egorenkov <egorenar@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Andreas Krebbel <krebbel@linux.ibm.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH 4/8] s390/entry: workaround llvm's IAS limitations
Date: Mon, 16 May 2022 11:07:43 +0200	[thread overview]
Message-ID: <YoIUX864ULCwu4pz@tuxmaker.boeblingen.de.ibm.com> (raw)
In-Reply-To: <Yn1CyTcrZk1Kgvoq@osiris>

On Thu, May 12, 2022 at 07:24:25PM +0200, Heiko Carstens wrote:
> From fe4fb0b014378d84ae517deaea338577b2ea6ae0 Mon Sep 17 00:00:00 2001
> From: Heiko Carstens <hca@linux.ibm.com>
> Date: Sat, 7 May 2022 15:00:40 +0200
> Subject: [PATCH 3/7] s390/entry: workaround llvm's IAS limitations
> 
> llvm's integrated assembler cannot handle immediate values which are
> calculated with two local labels:
> 
> <instantiation>:3:13: error: invalid operand for instruction
>  clgfi %r14,.Lsie_done - .Lsie_gmap
> 
> Workaround this by adding clang specific code which reads the specific
> value from memory. Since this code is within the hot paths of the kernel
> and adds an additional memory reference, keep the original code, and add
> ifdef'ed code.
> 
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
>  arch/s390/kernel/entry.S | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> index a6b45eaa3450..f2f30bfba1e9 100644
> --- a/arch/s390/kernel/entry.S
> +++ b/arch/s390/kernel/entry.S
> @@ -172,9 +172,19 @@ _LPP_OFFSET	= __LC_LPP
>  	lgr	%r14,\reg
>  	larl	%r13,\start
>  	slgr	%r14,%r13
> -	lghi	%r13,\end - \start
> -	clgr	%r14,%r13
> +#ifdef CONFIG_AS_IS_LLVM
> +	clgfrl	%r14,.Lrange_size\@




> +#else
> +	clgfi	%r14,\end - \start
> +#endif
>  	jhe	\outside_label
> +#ifdef CONFIG_CC_IS_CLANG
> +	.section .rodata, "a"
> +	.align 4
> +.Lrange_size\@:
> +	.long	\end - \start

Isn't the machine check handler refers to this memory before checking
unrecoverable storage errors (with CHKSTG macro) as result of this change?

> +	.previous
> +#endif
>  	.endm
>  
>  	.macro SIEEXIT
> -- 
> 2.32.0

  parent reply	other threads:[~2022-05-16  9:08 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 12:05 [PATCH 0/8] s390: allow to build with llvm's integrated assembler Heiko Carstens
2022-05-11 12:05 ` [PATCH 1/8] s390/alternatives: provide identical sized orginal/alternative sequences Heiko Carstens
2022-05-13  9:17   ` Vasily Gorbik
2022-05-11 12:05 ` [PATCH 2/8] s390/alternatives: remove padding generation code Heiko Carstens
2022-05-11 17:02   ` Heiko Carstens
2022-05-13  9:18   ` Vasily Gorbik
2022-05-11 12:05 ` [PATCH 3/8] s390/entry: shorten OUTSIDE macro Heiko Carstens
2022-05-12 15:59   ` kernel test robot
2022-05-12 16:20   ` kernel test robot
2022-05-12 17:21   ` Heiko Carstens
2022-05-12 18:00     ` Nick Desaulniers
2022-05-12 19:15       ` Heiko Carstens
2022-05-12 19:25         ` Nick Desaulniers
2022-05-13 12:29           ` Heiko Carstens
2022-05-11 12:05 ` [PATCH 4/8] s390/entry: workaround llvm's IAS limitations Heiko Carstens
2022-05-11 17:30   ` Nathan Chancellor
2022-05-12 17:24     ` Heiko Carstens
2022-05-12 19:06       ` Nathan Chancellor
2022-05-12 19:16         ` Heiko Carstens
2022-05-16  9:07       ` Alexander Gordeev [this message]
2022-05-16 10:19         ` Heiko Carstens
2022-05-16 10:42           ` Jonas Paulsson
2022-05-16 11:11           ` Alexander Gordeev
2022-05-16 14:05             ` Heiko Carstens
2022-05-11 12:05 ` [PATCH 5/8] s390/purgatory: " Heiko Carstens
2022-05-11 19:54   ` Nick Desaulniers
2022-05-12 17:26     ` Heiko Carstens
2022-05-12 17:25   ` Heiko Carstens
2022-05-11 12:05 ` [PATCH 6/8] s390/boot: workaround llvm IAS bug Heiko Carstens
2022-05-11 19:50   ` Nick Desaulniers
2022-05-11 12:05 ` [PATCH 7/8] s390/boot: do not emit debug info for assembly with llvm's IAS Heiko Carstens
2022-05-11 19:40   ` Nick Desaulniers
2022-05-12 17:30     ` Heiko Carstens
2022-05-11 12:05 ` [PATCH 8/8] scripts/min-tool-version.sh: raise minimum clang version to 14.0.0 for s390 Heiko Carstens
2022-05-11 19:27   ` Nick Desaulniers
2022-05-11 19:56     ` Nick Desaulniers
2022-05-12 19:06       ` Heiko Carstens
2022-05-11 19:48 ` [PATCH 0/8] s390: allow to build with llvm's integrated assembler Nick Desaulniers
2022-05-12 19:04   ` Heiko Carstens
2022-05-11 20:52 ` Nathan Chancellor
2022-05-12 19:03   ` Heiko Carstens

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=YoIUX864ULCwu4pz@tuxmaker.boeblingen.de.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=egorenar@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=paulsson@linux.vnet.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=ulrich.weigand@de.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.