Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp768248iob; Thu, 12 May 2022 04:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf2rbYbxC44gGlmfkjUDs++yMIoEv7up+KxcFeQZnQ4pROIDoqocSSVzzs55bB3UTPTmwa X-Received: by 2002:a05:6402:1e94:b0:427:e496:6da1 with SMTP id f20-20020a0564021e9400b00427e4966da1mr34537459edf.136.1652354578469; Thu, 12 May 2022 04:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652354578; cv=none; d=google.com; s=arc-20160816; b=qNy5OGYSl7tglcA44F3AQBTCADpNEWg04znCWkYwdWndq/QcqY+3L+Ddp1bmCRDZ6p II4HtBn83A+xaIy+b/wscxw+HGV4g5TmR3AeAJfvKEtBK3Hx04Lib+9ZQ87KBisPuOZq Y69+SeAStAimiFO6ENWJFge7b3hLGN50pv+UvD8Fbia+GTODl+Cy/7T91ajCmORDobTD piSCBKkCwDMpanBQo7vovrVitTIoaKbf5fqLu6248H0vrdybJy0xQ4Eux2L3VdBGkwIS fSxyPZi1CQttV4D05/qFdEyCsmlzvCI4ttfJZCCaDtChru4RrCv3yedjpYmzXwT6YSYu mdog== 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=b+XtVCnhNftnHUR89hEtkAIVYJTBkDICvOT21QHcEsY=; b=Zi1gyiSXxu3ud3hEDiOTxek2p7W5w6rlFg4y4rV6pVZv3RfVFEVmJQoabPk9So3Ra9 gnrEOk+MGZ7K1PUtpS1lye4CypU/gY4MUwZzk3sNuaDSpJQst0qcMPHTQwvxacRP1pci 1hqDqXNYDu0WQbT0PY/4GA/c0Ch73ohlE2ZOc6zxY8XbdtwYUTl5ddKClwRDbpkFAoZn pVr2u1gMJUgD0M028uwe0krJqemRsaGiA7rqdYZtkMFpjSUhiSLut2cVifu0VTKnjBQq m6hxNSX2NlQPBB0nztMzfATXOBiSWsr3ODZrBDlkMUQnCUW+EhQ0wf23/zA4jnlomPma rWwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GFN6k71A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs35-20020a1709072d2300b006e898e90a1esi6250784ejc.776.2022.05.12.04.22.32; Thu, 12 May 2022 04:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GFN6k71A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345568AbiEKRaN (ORCPT + 99 others); Wed, 11 May 2022 13:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239654AbiEKRaL (ORCPT ); Wed, 11 May 2022 13:30:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 561387890B; Wed, 11 May 2022 10:30:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 115C0B82529; Wed, 11 May 2022 17:30:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3B52C340EE; Wed, 11 May 2022 17:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652290207; bh=WvIKEZHgEn+Dq25Zw6Rksrl5jKHKzLQEMQqd1N3j2Ko=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GFN6k71AHMTgNwJwkH1IqkuKUozdUKqDNTuKbJ2jJ+BaNtNcV4i/l9n1TSzaUH6oA p/Q/MWNZfRv99aOZ6I/p8457maoeuz7iUx+Xqb3/SXGTny37hRQe+jY+b5uN+n/CC5 RJRhLeHl7oPmsIVTDDiQzUpKWmeeOPyuB+dGUw3lMqZZSlBCF9zk9hVsAq7ITXs2G4 +RzhJFL77Q2N/y/VqzXgO3evkSHPIg7MDkPRSI2vgwPYBFLNeLds8AScgtCLxzamRl /EKA49IJd5x/zajQO1DbTb3+bM5me72u1MHoxpoaNVufOZcVhJuhl9r8mCTdkG1/DU r3DcvRmJDTG7g== Date: Wed, 11 May 2022 10:30:05 -0700 From: Nathan Chancellor To: Heiko Carstens 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: <20220511120532.2228616-5-hca@linux.ibm.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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? > + 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 > > Cheers, Nathan