Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2420026pxb; Tue, 9 Mar 2021 01:59:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi7u5JJ0n+jIzvi6vNGjXrpb6wxSm6Ae3NmIsFWu0P2ozVwbutBarWMyrfbaX1+SSr139J X-Received: by 2002:a17:907:9863:: with SMTP id ko3mr19382790ejc.543.1615283963153; Tue, 09 Mar 2021 01:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615283963; cv=none; d=google.com; s=arc-20160816; b=uUk+1nobKnTLW46L4AAZxQeHC7L9fhWSc5/x047he7KxtfFPc4OUI2yDdj8ElJCn7k 4nI8hZ84/R5CYBI8oPHwF/1BebkC6APQMAqP1gpyMJnogSo0kobzypbE+buZIufA5Z4y PTnvr8os2YECBo8I2Xn74fmAAzmQQepVGUhhjP2E9FwFE7gD5n5928Cy2w38s4XBWRZr ekWk3ShlkCmQPZcofSIgoVH076XpoUnkvaBaZEGZJYtU1LJa6z4o8oOD5EUX2gez85r5 QnHmym1HRpJBFXNlX+houXL45Bym65D38F4WCbkzlrQs+orPtWAWfTAlky7jxyPl+1lp FsRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=0dPak7nn+SU8+Xuys75l4WcJMBmeSFyJZiQopD1s0NU=; b=Wzc/95eFvz7u2xYUB+WQ6lsGMBYxO2Wy0pJ7KpEK21eCOQ8fJiVQE2RszucGImkt7t UevBXkdhlEedNd88v1ET7fzO7zhwG5qU3Vmh0ffv7vBHhwm3vFW6+7pArK/t4E34/B2q 3f7Ml2k330XoUNyW22K8DRPVJ8sKMWgOzIBRlbCdu8z1uWyJcrePcyodEzYjq34CMKW5 kuc+JTIeAo1XjtZHqXuVgGuyRCEs6eS5vcOURCuBv8EdRosp2I2swTXvt4bVrGA/83+t DKcCsSZPA/VeOnIykRgO1tt1XsJQtmaA9VI7ScPGBQY/MvFwpBREDp94ONNBbrkGyGHC syUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si8651796eji.285.2021.03.09.01.58.59; Tue, 09 Mar 2021 01:59:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229649AbhCIJ55 (ORCPT + 99 others); Tue, 9 Mar 2021 04:57:57 -0500 Received: from muru.com ([72.249.23.125]:41370 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbhCIJ5m (ORCPT ); Tue, 9 Mar 2021 04:57:42 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 17CE9802C; Tue, 9 Mar 2021 09:58:22 +0000 (UTC) Date: Tue, 9 Mar 2021 11:57:37 +0200 From: Tony Lindgren To: Arnd Bergmann Cc: Aaro Koskinen , soc@kernel.org, Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: omap1: fix building with clang IAS Message-ID: References: <20210308153430.2530616-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210308153430.2530616-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann [210308 15:35]: > From: Arnd Bergmann > > The clang integrated assembler fails to build one file with > a complex asm instruction: > > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: error: invalid instruction, any one of the following would fix this: > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: armv6t2 > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: thumb2 > mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit > ^ > > The problem is that 'NR_IRQS_LEGACY' is not defined here. Apparently > gas does not care because we first add and then subtract this number, > leading to the immediate value to be the same regardless of the > specific definition of NR_IRQS_LEGACY. > > Neither the way that 'gas' just silently builds this file, nor the > way that clang IAS makes nonsensical suggestions for how to fix it > is great. Fortunately there is an easy fix, which is to #include > the header that contains the definition. Acked-by: Tony Lindgren