From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FC95C433EF for ; Wed, 11 May 2022 17:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345570AbiEKRaO (ORCPT ); Wed, 11 May 2022 13:30:14 -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> 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