Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp554562ybb; Fri, 10 Apr 2020 05:36:43 -0700 (PDT) X-Google-Smtp-Source: APiQypLHYoRIhqrur+MDvJyGqgBu4lz0mjdceE6rdXl5TI5kl1DQKWrH1xIWXzSq2+GTq3ht7QAG X-Received: by 2002:a37:80c7:: with SMTP id b190mr3700285qkd.255.1586522203540; Fri, 10 Apr 2020 05:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586522203; cv=none; d=google.com; s=arc-20160816; b=uWtoFTVQEUQdVQleu7PANaHZNGTp64fGqIzFuCM6zOQ1apos82CtdGz/en0TRq5DKR /D2f67Y15VSX0bDqWjcck0q4eEDeeosGLdezTbAakJgXdMX01o4o1nmGUYjD8PMdncqH fIVpHh7Aqmq0WsMCxUOmqVDytacBl49mmvJ+QlTS2ZL8FKtpRgVAG152g5bI7r1fK2pZ 3pkqetgaU9Hf8qvQP3FaRO+mypu+21urs0NJCyTM5RwNn0IPvxdi7iMiTJdlwEQHQDAd H2iVX2ympEWSa9yuzyA+ojnOiWqWl1kQNPdY+CGEIZVpiXOH2nsUKUJpg540aO/3ymKQ UXWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E1lO6MOH92TXjApRphPPU5REy5FFZ6ZxwRqdljo4K0I=; b=se5vYHQV9mRnU3/geBk5qE94nlU+DSOFOCau/Bvw2T5aEdNW53EM0NPi75W7cUIMe/ LdRvMhOFuJ1QJtiBl038vdzHwLP/ZubumDaZmuxg9B94xzMI89/wYeNy2vZjhyR9wpjV 5JRe9PVo1As8sWDIDDICoCfhhFoyf8zrMmIewqT52L/S0GpIuaV/2UEYT0mpChk5m89t SwrOdBUUxhSQh8M3xk6vsWRECdGe1uB6rH/fKuP6a0NHF5lXeAN05XpvlijU/KQE+Jdy bQvSdfergb7oxVIV6N5GGdU6+hTwQU2edCjTkzUjxVTqWHlImSpUiMsTQv2bwnFsYpS5 srcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=l4BUxrAo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si1187692qkk.28.2020.04.10.05.36.28; Fri, 10 Apr 2020 05:36:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=l4BUxrAo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbgDJMeS (ORCPT + 99 others); Fri, 10 Apr 2020 08:34:18 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:60780 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgDJMeR (ORCPT ); Fri, 10 Apr 2020 08:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E1lO6MOH92TXjApRphPPU5REy5FFZ6ZxwRqdljo4K0I=; b=l4BUxrAoEycXsvzjLPbLhvRWn YmPDjlzo97j79NsDCZtIMpz+tOfJ6KLwqm+t16Gc3OahvC/q8epEK3btHhPJNFVvr2sM8sdKkSn0O 4dqEY51qKb2+5UdFgeMYM+wTw0sXrrvHXl39ewXQXl5F0x5+LLa2OlyZWp7kIhy4tA3+R0NzIIOgN kItZyIUPPxOA1wiAS+fi/bo/hE4vTQXzskPL5uLJRtijka6wht30pxwQV3PLU/MYve1PNywLKPCPg CFQndh/X1J624Qe8ASBS0LUWvin4+mitfm5r9Ev/oGnDniUty9HF16ILDX85hnwTYHwUrPUbXS9b1 IcuRBqUUA==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:36520) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jMsqM-0001Tt-Nz; Fri, 10 Apr 2020 13:33:10 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jMsqD-0003m7-Pl; Fri, 10 Apr 2020 13:33:01 +0100 Date: Fri, 10 Apr 2020 13:33:01 +0100 From: Russell King - ARM Linux admin To: Ard Biesheuvel Cc: Arnd Bergmann , Jian Cai , Linus Walleij , Peter Smith , Stefan Agner , David Howells , Mauro Carvalho Chehab , Manoj Gupta , Benjamin Gaignard , "Joel Fernandes (Google)" , clang-built-linux , Ilie Halip , Masahiro Yamada , Krzysztof Kozlowski , Bartosz Golaszewski , Sami Tolvanen , "Eric W. Biederman" , "Steven Rostedt (VMware)" , jiancai@google.com, Doug Anderson , Dan Williams , Linux ARM , Greg Kroah-Hartman , Nick Desaulniers , "linux-kernel@vger.kernel.org" , Patrick Bellasi , Masami Hiramatsu , Tejun Heo , Andrew Morton Subject: Re: [PATCH] ARM: do not assemble iwmmxt.S with LLVM toolchain Message-ID: <20200410123301.GX25745@shell.armlinux.org.uk> References: <20200409232728.231527-1-caij2003@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 10, 2020 at 01:15:08PM +0200, Ard Biesheuvel wrote: > On Fri, 10 Apr 2020 at 11:56, Arnd Bergmann wrote: > > > > On Fri, Apr 10, 2020 at 1:28 AM 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 > > > kernel. > > > > > > Signed-off-by: Jian Cai > > > > It clearly makes sense to limit the Kconfig option to compilers that > > can actually build it. > > A few questions though: > > > > - Given that Armada XP with its PJ4B was still marketed until fairly > > recently[1], > > wouldn't it make sense to still add support for it? Is it a lot of work? > > > > The part of that file that the assembler chokes on hasn't been touched > by anyone since Nico added it 15+ years ago. It can only be built in > ARM mode, and it disassembles to the sequence below (the ld/st fe/fp > mnemonics are not document in recent versions of the ARM ARM, and > aren't understood by Clang either) For older CPUs, it doesn't matter what the latest ARM ARM says, the appropriate version of the ARM ARM is the one relevant for the CPU architecture. This is a mistake frequently made, and it's been pointed out by Arm Ltd in the past (before ARMv6 even came on the scene) that keeping older revisions is necessary if you want to be interested in the older architectures. However, there's an additional complication here: DEC's license from Arm Ltd back in the days of StrongARM allowed them to make changes to the architecture - that was passed over to Intel when they bought that part of DEC. Consequently, these "non-Arm vendor" cores contain extensions that are not part of the ARM ARM. iWMMXT is one such example, which first appeared in the Intel PXA270 SoC (an ARMv5 derived CPU). In fact, several of the features found in later versions of the ARM architecture came from DEC and Intel enhancements. If your compiler/assembler only implements what is in the latest ARM ARM, then it is not going to be suitable for these older CPUs and alternate vendor "ARM compatible" CPUs. > Instead of playing all these tricks with Kconfig, couldn't we simply > insert the bare opcodes and be done with it? That gets close to a GPL violation; the GPL requires that source code be in the preferred form for making modifications. Encoding raw opcodes can in no way be argued to be the preferred form. Arguing that raw opcodes is acceptable sets a precedent that makes it acceptable for other "works" to do the same, which makes arguments against firmware supplied as a hexdump null and void. Using macros to emulate the instructions and create the appropriate opcodes is an alternative; we already have that for some of the VFP code as early toolchains had no support for the VFP instructions. So no, bare opcodes are unacceptable. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up