From patchwork Sat May 20 20:55:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784177 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=VCaYW3G4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKkw0KZcz20PS for ; Sun, 21 May 2023 22:34:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78A6D847BE; Sun, 21 May 2023 14:33:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VCaYW3G4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 859E0846F5; Sat, 20 May 2023 22:56:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: 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,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4C02184788 for ; Sat, 20 May 2023 22:56:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-64d3e5e5980so1833330b3a.2 for ; Sat, 20 May 2023 13:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616159; x=1687208159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=InoEq+AaL26nnJdM5Lq2etOtlaMr9y3SfybpWyCn+Fw=; b=VCaYW3G4He6pbb2ocH0SeSigzg4RBqB88X09jjOiZV4QPfxXurTpzo5gapCb22j7/l B7mit349Wi4w5Hk4H95de8KMBsmWlsLD6TWbBL7Wt5mOT7HgcmZy4OVr5Asxcrx2Ilh9 9imHy0s5EDRBDkydX7jN8iM8n1t1oupSp2yFsDWKV3D/9jtlUyp/n27fcYjBmFya0s+O BX4tjSEpgxCLJZNEmaFmWKaXSXihnEHgzwajVRq2GW2neZ3GxHcOLR4UalUQeNpdDCGL I9IBXO9FrxI4jXlT103Ff6Uhe6MFvzGSyiZo2gzYk3tL6nDuVtLVsoJsNgIUzbhPvtxx 6DdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616159; x=1687208159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=InoEq+AaL26nnJdM5Lq2etOtlaMr9y3SfybpWyCn+Fw=; b=Hpc9oGJ9O63fzDLSu11qdvrMKptY3LtrD+QQm2eaZmiSMBdrFbQcsYb4/apBj/Asz7 RZrM4+aD3aUNYUYhA2LQfkSmacydpdDuNQBYgdDqbhYAQ97QvcY6pv8jPN0nMBNVn77W gv4NCWtzexEQ0ruOdndFoP399tmQqwKgikLPvF/KnyTcLw29OIr9DeI6bCVn1cAbPh+E Q/F781+X7XdvSNLEoRpyNe/YGHRvX+J1aJJ3yezZmaayYAmY29UqHghpx6rAxjyWUKXO sCBKfpz2vo2CztoBbCLn3RFcLYdy4PK9MYzKqL8Yd9c/VuLMgl2nahjy2uNbsTIa+Hw1 iOVw== X-Gm-Message-State: AC+VfDxK9PVaohJ54EywomUgESZhd0xmcEMPKIjZgFGOqtM+AqdQsEbN 9GEqAp3/c2zXAj14pqE9/FqNZttekR7zBJnV X-Google-Smtp-Source: ACHHUZ5fyVXxL5mr3aX+9P7s4PRrTTxASI/77ao/IeS+7NtHQZHEvi8df9RVNpCoSwcy9rZkU3jm+Q== X-Received: by 2002:a05:6a00:190f:b0:64d:4a94:1a60 with SMTP id y15-20020a056a00190f00b0064d4a941a60mr3182751pfi.18.1684616159365; Sat, 20 May 2023 13:55:59 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:55:58 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini Subject: [RFC PATCH 02/10] arm: set alignment properly for asm funcs Date: Sat, 20 May 2023 14:55:39 -0600 Message-Id: <20230520205547.1009254-3-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean ARM requires a 4-byte alignment on all ARM code (though this requirement is relaxed to 2-byte for some THUMB code) and we should be explicit about that here. GAS has its own fix for this[1] that forces proper alignment on any section containing assembled instructions, but this is not universal: Clang's and other gaslike assemblers lack this implicit alignment. Whether or not this is considered a bug in those assemblers, it is better to ask directly for what we want. [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=12931 Signed-off-by: Sam Edwards --- arch/arm/include/asm/linkage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/linkage.h b/arch/arm/include/asm/linkage.h index dbe4b4e31a..73bf25ba4e 100644 --- a/arch/arm/include/asm/linkage.h +++ b/arch/arm/include/asm/linkage.h @@ -1,7 +1,7 @@ #ifndef __ASM_LINKAGE_H #define __ASM_LINKAGE_H -#define __ALIGN .align 0 -#define __ALIGN_STR ".align 0" +#define __ALIGN .p2align 2 +#define __ALIGN_STR ".p2align 2" #endif