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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 A65F5C43460 for ; Mon, 12 Apr 2021 16:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7550861287 for ; Mon, 12 Apr 2021 16:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244697AbhDLQa7 (ORCPT ); Mon, 12 Apr 2021 12:30:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:57598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244362AbhDLQ16 (ORCPT ); Mon, 12 Apr 2021 12:27:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2543561397; Mon, 12 Apr 2021 16:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618244719; bh=hHIQYb42wdWozvUKH6R1Uzezj7+klWmXY0qSapeadp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jXtpbT4uB0TmbtepzNInldPc86cFwVhXUisP0CgdkMLoT/U/Up6DO61NC14JYAW0I 9neLExG8Zv/Qn6WXqn8vvVxTy97JIo3QD2Pys8mUelqJ/LKSH1StyV4+bOppfOzXE0 PM+YJWB8eXt/043wvLE+5TzCq3ASDpTocG4qGDkvv/+T6dap2ZXdVmAQ27aaXgqSuY muzZZOLtnTDXkFSwc09c6zAe4Pp9Q/B62YlhFCih+Qq5UJ3OMwBhowUsDbDRBVYAm6 v8sqcH6XNCUv1dLGOtBrw0ZBdHoInMc8o4OSh9jqMzfJ7zBuCVOgRmjLkEKiCKLWEz vhxXS2WSJdGEA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Tony Lindgren , Sasha Levin , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.4 13/39] ARM: omap1: fix building with clang IAS Date: Mon, 12 Apr 2021 12:24:35 -0400 Message-Id: <20210412162502.314854-13-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210412162502.314854-1-sashal@kernel.org> References: <20210412162502.314854-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Arnd Bergmann [ Upstream commit 28399a5a6d569c9bdb612345e4933046ca37cde5 ] 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. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20210308153430.2530616-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/mach-omap1/ams-delta-fiq-handler.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index 14a6c3eb3298..f745a65d3bd7 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S @@ -15,6 +15,7 @@ #include #include +#include #include "ams-delta-fiq.h" #include "board-ams-delta.h" -- 2.30.2 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 668BDC433ED for ; Mon, 12 Apr 2021 16:27:37 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 0C967613E8 for ; Mon, 12 Apr 2021 16:27:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C967613E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nURqX4+AmJdqPK/fbzxJR9a8hRE4GxJG/HLE3b1UHtw=; b=oBAqCyqvZ4ke+WM15fHmyTKUy ZCWG1h/jtL54RNxOGNJEPPmE8puw1uVhjf34lnw/xLqO7XD0DOp2M3FP/kt7vPpgYysRnpxBL0H9O zyPEoUQD4+2NFTaWEpd1F5w/tw4EzMu03ccKXBWHajjleAYm7/pwBJw8oypTzn5rsup9p8EFPW0LD +LGpmx1JboAhvQ7Uu443kgVuQfT0w15Z3xPKxcMSfDNY/x/svxnRNMuf9kxb0+LytHaO8oe5WsK5Y tfohnUOJ1bYEmPjKzPz5yAjXzn6WFAPGx+O+rhykqtuQYujHZI/Arpf0vaIFvNV/22q7mi9n4kLeD 4nxNRkPAw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVzNY-007FGk-7p; Mon, 12 Apr 2021 16:25:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVzNJ-007FB6-Uh for linux-arm-kernel@desiato.infradead.org; Mon, 12 Apr 2021 16:25:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=RaDl9JEIWgVAFZL3gEUyzg4YZfcDec31NPrL6udkmaM=; b=yGROh8bpzpDjLVy5817Q68Gkpe pILA2Dh9tVu6Jra3nn/WMoIYuWCv7aPHoh4/SA6fJbE4/FwwpLmKhCKx0ysp1LkVRYMW44U4/jjAB vVItmlANwpURqW8tvJpYJKhAjzS+HlPp1StqfEDH75dA0BsbJklZxBQuLwzJ/DUnJy/8PZqs68y7W 1r2xtxPjOTog2ftO1JOY4lxRW+vypxZo5gijl7tiBJDZSKEhdlMV028choKimQFvMSU4TWieO9MEu V59b2k/83Eij1evdNkAMI+NjoORpiEKvRTz7pZD38BEOnTByEbkW+8eHPZrmZmNiy4U5/yTvqtxkO AhWwh5oA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVzNH-006OOl-9Y for linux-arm-kernel@lists.infradead.org; Mon, 12 Apr 2021 16:25:20 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2543561397; Mon, 12 Apr 2021 16:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618244719; bh=hHIQYb42wdWozvUKH6R1Uzezj7+klWmXY0qSapeadp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jXtpbT4uB0TmbtepzNInldPc86cFwVhXUisP0CgdkMLoT/U/Up6DO61NC14JYAW0I 9neLExG8Zv/Qn6WXqn8vvVxTy97JIo3QD2Pys8mUelqJ/LKSH1StyV4+bOppfOzXE0 PM+YJWB8eXt/043wvLE+5TzCq3ASDpTocG4qGDkvv/+T6dap2ZXdVmAQ27aaXgqSuY muzZZOLtnTDXkFSwc09c6zAe4Pp9Q/B62YlhFCih+Qq5UJ3OMwBhowUsDbDRBVYAm6 v8sqcH6XNCUv1dLGOtBrw0ZBdHoInMc8o4OSh9jqMzfJ7zBuCVOgRmjLkEKiCKLWEz vhxXS2WSJdGEA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Tony Lindgren , Sasha Levin , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.4 13/39] ARM: omap1: fix building with clang IAS Date: Mon, 12 Apr 2021 12:24:35 -0400 Message-Id: <20210412162502.314854-13-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210412162502.314854-1-sashal@kernel.org> References: <20210412162502.314854-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_092519_357550_9C0A45A4 X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann [ Upstream commit 28399a5a6d569c9bdb612345e4933046ca37cde5 ] 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. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20210308153430.2530616-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/mach-omap1/ams-delta-fiq-handler.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index 14a6c3eb3298..f745a65d3bd7 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S @@ -15,6 +15,7 @@ #include #include +#include #include "ams-delta-fiq.h" #include "board-ams-delta.h" -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel