lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/8] s390/entry: workaround llvm's IAS limitations
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

\
 
 \ /
  Last update: 2022-05-16 11:08    [W:0.102 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site