Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp712989yba; Sun, 31 Mar 2019 10:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjB9jZjMbqUprAdOcrmKNCO7+g0H2Wh9Xud6nxeT3n0VVi4tKzWtcE9y2zHbMANl1+nxVY X-Received: by 2002:a17:902:6bc5:: with SMTP id m5mr3116594plt.180.1554053892122; Sun, 31 Mar 2019 10:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554053892; cv=none; d=google.com; s=arc-20160816; b=bKn3Vm8OvE+EfgW0YgNZHfPXEBpGqicag+PMHJS2Y3Ds2YahdZitFRJ0dE5yzNnjL7 rDjoZUqI2sJPc4TXIL598HN8p54DQdfaVag+dqFYOVX/iZpPwAQnh9URCfYGg+gsnDw2 dV4tDFYH7BXStOAKJOMzMBG+yXT2NvtBF84RSmrKm8u/TBUU1AoLeKnQyh3djhp8iME0 HOzQACEtPKu/vCygf8pjpYJqEtLzui7wU6nvoudJyx3YCV7wCmXVhl7zlHU3gGvaSvpY leTTRryrbCvIPSBYjwRCO+LS3lemKEjIcPwPNTyC6UMLnJA0xnODFzUylSt9ot3IM+R/ Gebw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=/gjdB4SoHlm9ZmWAZsmFD/rFsiLq8oc9ztEdOrcodA8=; b=AW3LsbsJZYCkAtvHAwMKolY80FTRKM6RJ7qJTt0cma8qr+BBKah6jkAWH1Wr8h9lqE fY+bSIwg0FRTOJVb800DUjpQnPvu0pO8sudgsLjb4lq8EAb3OninCOU5dXIW7vUQ5hY8 wzxl8oyy7hwSAhsH7EytkMlA2QgTrX2KeIyRqimHosXkPaXrrs79gbkD1uACSaugHw/W 2EBTk+F42+RoMy7jEgfa2k2JIHbzyWol0bM23cqryCQ0TdQ7efJCHwcfx/7UUe9sfj5Q DRJjMxA3rciy1Igk/dYEDmERexvNsm3ueGLRP/8QU70MYZAFEHJV4X2aVcH/W9igjR58 3JoA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si7141794pfe.90.2019.03.31.10.37.43; Sun, 31 Mar 2019 10:38:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731304AbfCaRfI (ORCPT + 99 others); Sun, 31 Mar 2019 13:35:08 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:45948 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731241AbfCaRfI (ORCPT ); Sun, 31 Mar 2019 13:35:08 -0400 Received: by mail-qt1-f196.google.com with SMTP id v20so7943392qtv.12 for ; Sun, 31 Mar 2019 10:35:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/gjdB4SoHlm9ZmWAZsmFD/rFsiLq8oc9ztEdOrcodA8=; b=kmMR9MSAdkKVnKiun9oVj6WwfXbHZwdrrc71ybukxRCuCqHzgxTUAY4iHu9NW3o0iz 7Sx5BkqLHbIx4hvKAj9H/KZX6p9+5oZMZIFcSVUaGKmMGWjvk3OrjQp5YVGOJdPeSyOk +TjXYTMQ8Ow3YH+8mkahHlyBisFlwAOGW9at5DWmuMmxmpVqtZ9oijzQ7c84ChocqRiD 72JmshI2zaYV86V6O7Jq885q7apSZHC6N7bWcJ0IcZYrCBXcdOU6csxl8uX1aBp3cJqy /C/8jb74McwntJmHgodGvQRS1/W9jG/teR1cbWpLB/xWezsyTWHPSiAojAu/MmY7T1wf nC/g== X-Gm-Message-State: APjAAAVEkbs8o3CRFtg8tU1Ci0H/5S+PnSvs1Bk2XzpZOnageDaKdxuM VvsgTkndhx1bZi2aMAu6RsddDQEZ50/qqPZBjTI= X-Received: by 2002:ac8:1637:: with SMTP id p52mr49432977qtj.212.1554053707273; Sun, 31 Mar 2019 10:35:07 -0700 (PDT) MIME-Version: 1.0 References: <9641c58c03720104186a797a96e30a52ae9805e4.1553356359.git.stefan@agner.ch> In-Reply-To: From: Arnd Bergmann Date: Mon, 1 Apr 2019 00:34:49 +0700 Message-ID: Subject: Re: [PATCH 1/3] ARM: use arch_extension directive instead of arch argument To: Stefan Agner Cc: Russell King - ARM Linux , Ard Biesheuvel , Robin Murphy , Nicolas Pitre , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list , Kukjin Kim , Krzysztof Kozlowski , Rob Herring , Santosh Shilimkar , Jason Cooper , Andrew Lunn , Gregory CLEMENT , Sebastian Hesselbarth , Tony Lindgren , Marc Gonzalez , Mans Rullgard , Nick Desaulniers , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 24, 2019 at 3:06 AM Arnd Bergmann wrote: > > On Sat, Mar 23, 2019 at 4:52 PM Stefan Agner wrote: > > > > The LLVM Target parser currently does not allow to specify the security > > extension as part of -march (see also LLVM Bug 40186 [0]). When trying > > to use Clang with LLVM's integrated assembler, this leads to a build > > errors such as this: > > clang-8: error: the clang compiler does not support '-Wa,-march=armv7-a+sec' > > > > Use ".arch_extension sec" to enable the security extension in a more > > portable fasion. > > > > Note that this is technically not exactly the same as the old code > > checked for availabilty of the security extension by calling as-instr. > > However, there are already other sites which use ".arch_extension sec" > > unconditionally, hence de-facto we need an assembler capable of > > ".arch_extension sec" already today (arch/arm/mm/proc-v7.S). The > > arch extension "sec" is available since binutils 2.21 according to > > its documentation [1]. > > > > [0] https://bugs.llvm.org/show_bug.cgi?id=40186 > > [1] https://sourceware.org/binutils/docs-2.21/as/ARM-Options.html > > > > Signed-off-by: Stefan Agner > > This sounds like a good idea. I think we have platform specific > minimum toolchain versions elsewhere, but I don't see a problem > with raising the minimum version for all the armv7ve platforms. > > I've added this patch to my randconfig test queue, but please > send it to arm@kernel.org for inclusion when you have > collected more Acks. > > Do you have a git tree with other patches required for the > integrated assembler? I might try that out as well with > my randconfig tree. At the moment I'm building with > clang-8 and a small number of patches on top. > > Acked-by: Arnd Bergmann I only now looked at the results and found a problem: In a mixed v6/v7 configuration, the arch_extension flag is not sufficient, and for armv6+sec, we get failures like /git/arm-soc/arch/arm/mach-omap2/sleep44xx.S: Assembler messages: /git/arm-soc/arch/arm/mach-omap2/sleep44xx.S:343: Error: selected processor does not support `isb' in ARM mode /git/arm-soc/arch/arm/mach-omap2/sleep44xx.S:350: Error: selected processor does not support `dsb' in ARM mode /git/arm-soc/arch/arm/mach-omap2/sleep44xx.S:351: Error: selected processor does not support `dmb' in ARM mode clang: error: assembler command failed with exit code 1 (use -v to see invocation) /git/arm-soc/scripts/Makefile.build:369: recipe for target 'arch/arm/mach-omap2/sleep44xx.o' failed make[3]: *** [arch/arm/mach-omap2/sleep44xx.o] Error 1 ==> build/arm/0x64728DCE_defconfig/log <== /git/arm-soc/arch/arm/mach-omap2/omap-smc.S: Assembler messages: /git/arm-soc/arch/arm/mach-omap2/omap-smc.S:31: Error: selected processor does not support `dsb' in ARM mode /git/arm-soc/arch/arm/mach-omap2/omap-smc.S:53: Error: selected processor does not support `dsb' in ARM mode /git/arm-soc/arch/arm/mach-omap2/omap-smc.S:54: Error: selected processor does not support `dmb' in ARM mode Arnd