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 X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88C27C2BA19 for ; Fri, 10 Apr 2020 00:12:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FBD620768 for ; Fri, 10 Apr 2020 00:12:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="c8GFWG5G"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZRsrd9fo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FBD620768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ARRJdI9S//GgI/VsUwDKfAaYv8L+Z1eEAV+h91YnUPA=; b=c8GFWG5GWxsQWq 9QsdcrYbZKToO5Jt+c08eWk/DQaZFM1EiGGR8u8H+b2koZzDYSWGJkEqeA/NtXQTwA6PhPCkdoeXT vacbV+Sth0dFsVk3Sze/71J6WEKQ4/Yb74EKp0sTKkHfFov5lA4TTXmUh9/vVOsNBISYxNcIDP3Wz 2XGqQFkCunsrGI3SqaDzQXV8AiGHYZSViWD04NLVXTPuKtmztJJbWFBTORzXjjK1E9BiudrONThaX w4z77S33GqOfBIfGDewmsXcHFEd/0YcKQ6Hq5mTljq+FvvkmyJ6zyh3E7WeadC3QUHQL4EfCIQCbl ILg8aAXtX4okaf6Pv1Gw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMhHI-0007wP-Gh; Fri, 10 Apr 2020 00:12:12 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMhHF-0007va-3P for linux-arm-kernel@lists.infradead.org; Fri, 10 Apr 2020 00:12:10 +0000 Received: by mail-oi1-x244.google.com with SMTP id w2so165783oic.5 for ; Thu, 09 Apr 2020 17:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JjCg+0ZKVUEU3m1mtuE7C2U4b9dMYk265cCmLvmPh20=; b=ZRsrd9foGs0GWEd9amU602pwhj9SzLnjEnilwCYt8UiT2smbNEbJlYImi6QRkHncC8 AaS9xP6V3zjvdz1p8XPHlz+BL+on5msn1cCcROxTzceDs5y54LB6YEJxRJ6bYZNCQT1V SrS4DieBPjvUhoQnk6YbFcJf0LPyQw4d13Djak7JeOyYl/CUlfSqpZZFr4pQgp7TTHP8 umlC6iW+1U7zKs5p0/2D8Z/R6mO263qt1PvyDno367L24yUnOcLbk5EBLnHhUkh8xewV tpGCi6ZwJO8yqZfZ9nsskBfoG1zMklLNkGnH2+5bQdTeOY/021d+DsTPRx+2qGOIDiv5 zf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JjCg+0ZKVUEU3m1mtuE7C2U4b9dMYk265cCmLvmPh20=; b=gC4zTnh3YCsAqyeCl7ge+FABqRRRwMXSUdYiBeYeX6G8jI6/B85XBmFtoDk2NDAUXF Vjkq9wfpbbpF0/S7ZtYwiwB2fTBk+HaeYHRfJbMf4E2XblIbsJW4/cH3E+UEGeUb837/ g5+zrW1gAkNTA23twBv40bykKmGdbust5UxJwJ/+dYQdpLxtsmmaYvh/kDdiAx7IHhfu LOTXCoCZyMcVajoYsSbQR0hJWvOfuGoB015hqZQR+pVFGi3WCKtt2APGO9Gm8akE70Zv QkE3WfYu+wJ72b/cmd18tElgWZLXllc2C8LzrcJV8hcs01iAEuBMdisLY1KE3sF/bP+u ECtg== X-Gm-Message-State: AGi0PuYs15CD4AlK2nZCPSIOCgmCa1RjBx7OJ5Tv5+GYIfRM2j6xdlUI RCGwM/uPtmXQli/jWWSTxh8= X-Google-Smtp-Source: APiQypLi1t8vlbkrqsMgkH03bKYkFF/ExZPKQY8Aok71iKZxs/zkBasvqvoTdonteG/ffgwudiljlQ== X-Received: by 2002:aca:c311:: with SMTP id t17mr1528797oif.169.1586477524193; Thu, 09 Apr 2020 17:12:04 -0700 (PDT) Received: from ubuntu-s3-xlarge-x86 ([2604:1380:4111:8b00::3]) by smtp.gmail.com with ESMTPSA id 186sm307290ooi.30.2020.04.09.17.12.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Apr 2020 17:12:03 -0700 (PDT) Date: Thu, 9 Apr 2020 17:12:01 -0700 From: Nathan Chancellor To: Nick Desaulniers Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain Message-ID: <20200410001201.GA15303@ubuntu-s3-xlarge-x86> References: <20200409232728.231527-1-caij2003@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200409_171209_170000_9CCB4465 X-CRM114-Status: GOOD ( 29.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , Peter Smith , Stefan Agner , David Howells , Mauro Carvalho Chehab , Manoj Gupta , Benjamin Gaignard , "Joel Fernandes \(Google\)" , Jian Cai , clang-built-linux , Ilie Halip , Masahiro Yamada , Russell King , Krzysztof Kozlowski , Bartosz Golaszewski , Sami Tolvanen , "Eric W. Biederman" , Arnd Bergmann , "Steven Rostedt \(VMware\)" , Jian Cai , Doug Anderson , Dan Williams , Linux ARM , Greg Kroah-Hartman , LKML , Patrick Bellasi , Masami Hiramatsu , Tejun Heo , Andrew Morton Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 09, 2020 at 05:01:33PM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > On Thu, Apr 9, 2020 at 4:28 PM Jian Cai wrote: > > > > iwmmxt.S contains XScale instructions LLVM ARM backend does not support. > > Skip this file if LLVM integrated assemmbler or LLD is used to build ARM > > Hi Jian, thank you for the patch. It's pretty much spot on for what I > was looking for. Some notes below: > > s/assemmbler/assembler > > :set spell > > ;) > > Also, could use a link tag, ie. > > Link: https://github.com/ClangBuiltLinux/linux/issues/975 > > (Always include the link tag to help us track when and where patches land). > > Finally, I think the hunks for the two different files should be > split; the init/Kconfig change should be it's own dedicated change > that goes to Masahiro, the maintainer of the Kbuild tree. Then when > we have that, the dependent configs should go separately. Would you > mind splitting this patch in two, and re-sending just the Kbuild patch > for now? Since you used Sami's patch for inspiration > (https://github.com/ClangBuiltLinux/linux/issues/975#issuecomment-611694153, > https://github.com/samitolvanen/linux/commit/fe9786cb52a0100273c75117dcea8b8e07006fde), > it would be polite to Sami to add a tag like: > > Suggested-by: Sami Tolvanen > > or maybe better yet, take Sami's patch, add your signed off by tag > (maintaining him as the git author, see `git log --pretty=fuller`), > then rebase your AS_IS_CLANG hunk on top, make that a second patch, > then finally have the arm change as a third patch. > > This change is exactly what I'm looking for, so these are just process concerns. I think that they can be sent as a series that is picked up by Masahiro with an ack from an ARM maintainer. > > kernel. > > > > Signed-off-by: Jian Cai > > --- > > arch/arm/Kconfig | 2 +- > > init/Kconfig | 6 ++++++ > > 2 files changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > index 66a04f6f4775..39de8fc64a73 100644 > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -804,7 +804,7 @@ source "arch/arm/mm/Kconfig" > > > > config IWMMXT > > bool "Enable iWMMXt support" > > - depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B > > + depends on !AS_IS_CLANG && !LD_IS_LLD && (CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B) > > default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4 || CPU_PJ4B > > help > > Enable support for iWMMXt context switching at run time if > > diff --git a/init/Kconfig b/init/Kconfig > > index 1c12059e0f7e..b0ab3271e900 100644 > > --- a/init/Kconfig > > +++ b/init/Kconfig > > @@ -19,6 +19,12 @@ config GCC_VERSION > > config CC_IS_CLANG > > def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) > > > > +config AS_IS_CLANG > > + def_bool $(success,$(AS) --version | head -n 1 | grep -q clang) $(AS) is being replaced with $(LLVM_IAS). That line should be: def_bool $(success,test $(LLVM_IAS) -eq 1) I think. That depends on a commit in Masahiro's for-next branch [1] so it should be based/tested against that. Otherwise, I agree with Nick's comment about being split into two patches (one for the init/Kconfig change and one for the ARM change) and adding the Link tag. I ran about 75 randconfigs with LD=ld.lld and LLVM_IAS=1 and I did not see any Kconfig warnings from this and CONFIG_IWMMXT was unset in every one. Should prevent the errors that you encountered. Feel free to apply the following tags to any follow up revisions. Tested-by: Nathan Chancellor # randconfig Reviewed-by: Nathan Chancellor [1]: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git > > +config LD_IS_LLD > > + def_bool $(success,$(LD) --version | head -n 1 | grep -q LLD) > > + > > config CLANG_VERSION > > int > > default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) > > -- > > -- > Thanks, > ~Nick Desaulniers > Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel