Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp978417iob; Fri, 13 May 2022 18:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn6mW6bX7OuKfs7M+FnmmBYXNBNMUQApdFs24M3WjEWBoKpMfJ1JkbZ9Xn3RJJP03iDQWg X-Received: by 2002:a5d:5281:0:b0:20c:d5be:331c with SMTP id c1-20020a5d5281000000b0020cd5be331cmr5730743wrv.9.1652491367679; Fri, 13 May 2022 18:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652491367; cv=none; d=google.com; s=arc-20160816; b=d9Xx6vm1dfe71rzz9eAknqPyvPWxVQdfsoVOYM3VOrdQIR68RCosCcWTys8CT7MKdV tO5xc+x06BP6EyVw0GE74XZtRGAKZdgKFDVLMVgFkGIFnv1tWm2W/3bJX/YQYVPkKRbg 4runoX+9vZ0aNVk1wT83HFaNVy4ceZ0VLJWGNeRBxFXjvGJWCRbTXizdNYPupMpSYoq2 kUIYIFZ062Ornlkh+KAVVhJoHG1ezaIlig+bzWZYo1hPqR9wbRSpJeB+2pFwrUTKckVZ o+Ya2pnXoVj2Xbrc0BHDTvaJ+kutiSzMNwZzYVqbUlmylNX4JDji0tLs6Sqp/ZoNnWdM itXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0EnPkjy04iUDHw51RwN6mlhwJWDq0hIMdChZ8ntgUmo=; b=ZtZtWcGY00pIcAOP+UUClvMTbyNN2VIhVRYZ8DJEuohQZtncHZqcwmScxugoBRHICa FVjDJ3uwM/NEZ9WGJAKelq0OkktIT6+Gz1n3+YXQkFmXrzY1aEKvAkhH1fPSqisaD0xN ZaDB2NQmG/dvQF0s4sB9obQ09EGczCr80UpdCpa0NKtNhhUgO4ZF9wmvgmqXvJNe6fh4 iHhnIwpFUpURzEg79f/WuS7oR67zR8aOS8KO/Wi61BZk29IpEhY/yAXHwMBQOfKhKlB1 o7ZAIsts5BadAjHSlJMO9EOLg74eMq0DskmhbM9MfROEA3xtOrCFxeAq1AXZMM9eGI+L DQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gdrNhFRO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g26-20020a1c4e1a000000b0038ffbcf8a3bsi3432928wmh.106.2022.05.13.18.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gdrNhFRO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 674A83CF6EC; Fri, 13 May 2022 16:52:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356805AbiELRYj (ORCPT + 99 others); Thu, 12 May 2022 13:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346170AbiELRYh (ORCPT ); Thu, 12 May 2022 13:24:37 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 425A826AD97; Thu, 12 May 2022 10:24:37 -0700 (PDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24CHNnJO030267; Thu, 12 May 2022 17:24:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=0EnPkjy04iUDHw51RwN6mlhwJWDq0hIMdChZ8ntgUmo=; b=gdrNhFROIUrL9YgeUvDPRsVAe2hlZ1hidRoP5VkbxUXYV934d21g/HBZj/WjtQam/8fZ ufuf8/1d0NgfRswa4HCC90BX+vhyeF3JCCTfV5c40HVYOGZKwuVbQmPLpm79IPj0+Ryx Bpmb5+lnv16ldFqPn0V44dYnTEPBdcI+Kxzx2VZKOc+ThVOzh4k2JDv7GWaHTOiMTW2L 45N0OUB9W22FpqUPsAvpQYucn4LppEfx+mNllhIDROhEDYQ9mU/AZP30l5osZjkFw2Rv 6QudBQBXCMD8MWNc9JLjYhJzSAI0dyyfscZqKJuLve83+O9ur/uXnOtHZtO4SYKEXrxL 8g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g16dy094e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 17:24:35 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24CHOYdF031921; Thu, 12 May 2022 17:24:34 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g16dy093y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 17:24:34 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24CHHZ4U028828; Thu, 12 May 2022 17:24:32 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3fyrkk38tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 17:24:32 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24CHOR0H45613342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 May 2022 17:24:27 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AAC98A405C; Thu, 12 May 2022 17:24:27 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED615A405B; Thu, 12 May 2022 17:24:26 +0000 (GMT) Received: from osiris (unknown [9.145.44.123]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 12 May 2022 17:24:26 +0000 (GMT) Date: Thu, 12 May 2022 19:24:25 +0200 From: Heiko Carstens To: Nathan Chancellor Cc: Vasily Gorbik , Alexander Gordeev , Jonas Paulsson , Ulrich Weigand , Masahiro Yamada , Alexander Egorenkov , Sven Schnelle , Andreas Krebbel , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 4/8] s390/entry: workaround llvm's IAS limitations Message-ID: References: <20220511120532.2228616-1-hca@linux.ibm.com> <20220511120532.2228616-5-hca@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OMQVp_RV79RKXV7KXlYoqXnFDZ8vyD1k X-Proofpoint-GUID: R12ejW5A8IwqXRFKmu1gs953MqA3hVsB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-12_14,2022-05-12_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 clxscore=1011 mlxlogscore=880 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205120079 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 10:30:05AM -0700, Nathan Chancellor wrote: > Hi Heiko, > > On Wed, May 11, 2022 at 02:05:28PM +0200, Heiko Carstens wrote: > > llvm's integrated assembler cannot handle immediate values which are > > calculated with two local labels: > > > > :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 > > --- > > arch/s390/kernel/entry.S | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S > > index e1664b45090f..ff7a75078e93 100644 > > --- a/arch/s390/kernel/entry.S > > +++ b/arch/s390/kernel/entry.S > > @@ -171,8 +171,19 @@ _LPP_OFFSET = __LC_LPP > > .macro OUTSIDE reg,start,end,outside_label > > larl %r14,\start > > slgrk %r14,\reg,%r14 > > +#ifdef CONFIG_CC_IS_CLANG > > I intend to put this series through my build and boot test matrix later > today but one fly by comment in the meantime. Should this be > CONFIG_AS_IS_LLVM if this is an integrated assembler limitation, rather > than a clang one? Yes, that makes a lot of sense. Considering that I will drop the previous patch within this series, the new version looks like: From fe4fb0b014378d84ae517deaea338577b2ea6ae0 Mon Sep 17 00:00:00 2001 From: Heiko Carstens 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: :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 --- 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 + .previous +#endif .endm .macro SIEEXIT -- 2.32.0