Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1795387iob; Fri, 29 Apr 2022 13:05:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsAXLw1kZkl47O2zu/LKMSAdMSv8+Fm63Ui2E47srZ9DCQHgnhLZfeaQp6uiVLIhpLkcML X-Received: by 2002:ac2:46c3:0:b0:471:f5fc:ac4b with SMTP id p3-20020ac246c3000000b00471f5fcac4bmr594666lfo.381.1651262740094; Fri, 29 Apr 2022 13:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651262740; cv=none; d=google.com; s=arc-20160816; b=vxVBzXh/adFx9XPVTnYWHEoV/oI5Whww5CFwIorS18exEumHDu+rj/XMIQTcxUneFu Gd51KkUvK/hKVuuYP4mId+j1teQD1kWltUajkB2jzRLRSkBrGakw+UnwachS/o6Xl26F hR7q3aNv+Gz7ft104CLzA1GaPMSIdSPsR5Mhzm57/0BARO3Ai+LXgQXFY3PHDf8UlThw kFLDMl8ekklA2o/aY1wK5RsJ1g52NuJlQTxc5nlOcUs/ABqWthZCdHmQe97B/5qWKyPa tAUYuTnoCg5llQ1DC3WkvJjaO8dQuQfFb3ztXg2kRYZh+5a9O5iEwcpqdy+Uw5he7VGd l64Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=7R74MuG17CM4y+tqR9noT9bT0HIvwsXlMQlpqocbRZ0=; b=bLL3ti1r/FoTKQ2m6u7qzCGOQfcKMgK6e/QhXnG64SIqhx4RWdrElLt+cNMyU8TwKz 64H1HUnB/b2ANAgzaz9swLc5j0WhVScwaiTmWN7GT51gDXSDnMQOIQdwwKv3DSm1MgVj NxR/LDlUX5TJQOGQicc2SYr4kttuItvacPboxiF8/+L2clTrCJtjPMLIAnNMr8wpVBxO mXIUtNlT47TYiCDqOELvzK72RZBSgHTP3xPIiw3dXEyDGJf6Exdt78HlnaqEypTJrdNv TIBfzn4YL5vSNzre7TCx0TdZiOiTkArNYu0xJnqXbzzGKDw8tNEfHmwu9PrtGJNBRuUT /CuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o+9kiW06; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m22-20020ac24296000000b00449fff281c0si6982587lfh.322.2022.04.29.13.05.11; Fri, 29 Apr 2022 13:05:40 -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=@gmail.com header.s=20210112 header.b=o+9kiW06; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234386AbiD2Rno (ORCPT + 99 others); Fri, 29 Apr 2022 13:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379249AbiD2Rnm (ORCPT ); Fri, 29 Apr 2022 13:43:42 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D20B1BE89 for ; Fri, 29 Apr 2022 10:40:22 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id o11so6267706qtp.13 for ; Fri, 29 Apr 2022 10:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=7R74MuG17CM4y+tqR9noT9bT0HIvwsXlMQlpqocbRZ0=; b=o+9kiW06Ear6403XlouAhjtHmvWajVAJup+DwkzmRZDB+EMWCIK5RtC0JBtIyGp37V /F6kRqoueF/HyQCdTymTba1S7XZwMWYvMxZvakEMCRyGfV6nLAF7Xnr7RyDNc33QUOU5 ruylKv7Xozy8JvUqWXVLBBRw56lMPjQHXfWTqhr5JPgy04r90+cI9cIFOu8jBozY5dZA HOAy3hJ1DDMuOtFdCU/odzcFjY/RpO2Zm8MLXBLGPIe7BQxVUAoSFOtjvuyy14VtHO7k 19d33diYxHBZv8Cu+acbqmW98CGX21OWkQB9AtURV5gzGUb2oDu6scDZJuJTAVYdWoFl Ui3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=7R74MuG17CM4y+tqR9noT9bT0HIvwsXlMQlpqocbRZ0=; b=exFoNhoe76M/gB8Ae6QMgcWN/hODBEf425DxZLOUk9aibHRBsU8vQ08CDAQ04/Re1N edwZLPaOdHLF47uc8M/OT1+/VKr7qm9fqPiQishlA9+OQEow3pJW/Um9pqF0UdJZAJYR jA+zRVA9d4YufZcMEzXQo8YyhHHl7s1CSuX+L/xyRbG1j5V6S49E/DnlVLMe0JBlNDLN PSo+pZV3WRtejsOD4RHDLuzE/YjDm+G35FVVG5Rl2rjSSEEGIs/wnYwtIEqULVIiJY4K 7SmZYfc+WjfejbXoE3fI1jaGsLYQamGIUtq01EufAA7txyIj26/KAvnuPm1zcSaHJPfK BVzg== X-Gm-Message-State: AOAM531pcLdkGKVRIv1mKXXa6/rUhLh/8f5qP7SH3elEH/pLewuhMqTp D5pLKie9X6K4cVMg/hKD/9/In/D+sxPj0PSgeL2YB/Il+f+Kyg== X-Received: by 2002:a05:622a:613:b0:2f3:64b5:82d with SMTP id z19-20020a05622a061300b002f364b5082dmr496287qta.176.1651254021146; Fri, 29 Apr 2022 10:40:21 -0700 (PDT) MIME-Version: 1.0 From: Mauro Rossi Date: Fri, 29 Apr 2022 19:40:07 +0200 Message-ID: Subject: arch/x86/entry/entry: RFC on recent kernels building error with llvm 11.0.2 internal assembler To: luto@kernel.org Cc: Chih-Wei Huang , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Andy, I am an hobbyist contributing to android-x86 FOSS project lead by Chih-Huwei Huang (in Cc: for information/alignement) I am performing periodic tests to build kernel for Android 11 based iso image which relies on aosp shipped prebuild clang toolchain (clang version 11.0.2) When building linux 5.18rc4 and also with linux 5.17 x86_64 64bit kernel targets there is a building error in arch/x86/entry AS arch/x86/entry/entry_64.o :2:2: error: unknown use of instruction mnemonic without a size suffix lsl %rax, %rax ^ :1:1: note: while in macro instantiation LOAD_CPU_AND_NODE_SEG_LIMIT %rax ^ :2:2: note: while in macro instantiation GET_PERCPU_BASE %rax ^ /home/utente/r-x86_kernel/kernel/arch/x86/entry/entry_64.S:890:2: note: while in macro instantiation SAVE_AND_SET_GSBASE scratch_reg=%rax save_reg=%rbx ^ make[3]: *** [/home/utente/r-x86_kernel/kernel/scripts/Makefile.build:389: arch/x86/entry/entry_64.o] Error 1 make[2]: *** [/home/utente/r-x86_kernel/kernel/scripts/Makefile.build:550: arch/x86/entry] Error 2 make[1]: *** [/home/utente/r-x86_kernel/kernel/Makefile:1887: arch/x86] Error 2 make[1]: *** Waiting for unfinished jobs.... As other interesting info, the building error does not happen when building x86 32bit kernel target and i can build 86_64 64bit kernel target only by setting the LLVM_IAS=0 parameter to disable the internal llvm assembler I wanted to ask you if you could help us, if there could be a way to improve arch/x86/entry/entry_64.S code to be able to complete the build without disabling the llvm internal assembler. I don't know if this building error may be caused by the clang version 11.0.2, but at some point the aosp and android version may hit this same issue, so I wanted to highlight this issue to you to have a competent person feedback, as I am more a "trial and error" guy than a kernel expert Thanks in advance for any info Mauro Rossi android-x86 team