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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BACFFC61DA2 for ; Wed, 25 Jan 2023 19:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:From: Subject:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iFzXgQj2qvzaamMSX2bAoe5IMfWZ0cvSmNQG4N8QjZA=; b=ZqU2COcz0vECF7 eMWvesLz4BTd+qu/wWJaFBjIJGG3quPfUTRZApw5LPutYrU3xdzPlPGPKLbBLcIeF15QVhCMXUK5r aVKDsfZtlSMJxC8hJ9suYNI2+28W7GnYXNvLgFx05DYZCpqPGlo6k2KLyEZWdE3wfFM31nbn3H5FA FhwQAxHxZcZP2V1JIK4fYlhKrc4daTXlt2B+B9Lp1Sx669+rfOdrx44mneaneoBfKAokmrnU3Hzhe ZOJLNt0dyfSirSHRsYi1CeKM9J2VYmO/ihlQYqZEPp4e6bQkhLDTuguzo0QQ8Wfl7sJvM08+vRWIc git6UkLHKsgFHg2gPXzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKlnV-008UpG-Er; Wed, 25 Jan 2023 19:51:05 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKlnS-008Uow-OT for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 19:51:04 +0000 Received: by mail-ej1-x632.google.com with SMTP id mp20so50560474ejc.7 for ; Wed, 25 Jan 2023 11:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OFA5p07Ex5yre1lvfG3pKJUKvLLL4slXTG41uk2+exM=; b=QN1RNF1pp4APWIeKqa17d7Kp93GMOiA9O7Ztb9vOj0HtQ4PMQYIUGz8QsO+cjuCEBt ZfKgdzyKEBRAA7H4um1c0wexXcgJLbJcW0iup/04Y3VPgklDk39LWIj19PjeQfbNe+BY FLKa9GixHDcSvCX9Vo8JFuS201Iehrnqq7sVHmoU5PQq3dOlEVV2useTbULI8prOHuTW 8Bo8FmMz09n+Nv35heafdXUkEBPe/nzdEpc6a38Jv86Lo5LhuFvRu4GLsbZ2ehRuuSeS 6prJ+0VWb9Yx0GUPGLH50g+6MKeoKfPMyKONdz+KWo3Uj5YBX9udfGsplWGq2SSngu5C rh+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OFA5p07Ex5yre1lvfG3pKJUKvLLL4slXTG41uk2+exM=; b=PFofQxJIoNmjWFDedZBuYIeLqvAmRY70PylMTpctVWPbKFPSDuElzt8GmnvgsTdHDy ZfcPFanNJa0NTstI37Q05AZyDFCafZNYtzR1UE+vc7SomEtCmFVKL9Qz9b9YjIU2/1V4 KxPRYZHl/WAogLb+hrY2o6ldpS5ptOipZ/a/4oqHGK5Zji/Acvwz4WQU2CNyksdUaYRs N5vaRluYGh0dQRAEQJnowIbWNf5vv69xJvtkUKQBn9RJaE4J4c+zasZvdmnpPXd6/lis 049wztkc3oZ3YkX6yY2ZJNw3yFUL6p270xd/JOu/1uMc5VpsBLDqneoVAkgYtMI3A5g/ 8mJA== X-Gm-Message-State: AFqh2kogiPjyIFVuI36YO4R+14Axp4mxCM6wzpiInZEXNfONbXsf1Qw1 TCQAROlveCKKjrmeOu4CCYE= X-Google-Smtp-Source: AMrXdXvcEucHRWVu5YcGyPUyhBc0iFG7YJvMecK4wGTm/GizFIPTI8H9AET3RsgSlKvoGa/4ZdVWnQ== X-Received: by 2002:a17:906:5914:b0:860:ef29:a4e1 with SMTP id h20-20020a170906591400b00860ef29a4e1mr32883809ejq.55.1674676259326; Wed, 25 Jan 2023 11:50:59 -0800 (PST) Received: from localhost ([2001:b07:5d37:537d:484e:dc99:ec59:4292]) by smtp.gmail.com with ESMTPSA id bg3-20020a170906a04300b00855d6ed60desm2781408ejb.192.2023.01.25.11.50.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 11:50:58 -0800 (PST) Mime-Version: 1.0 Date: Wed, 25 Jan 2023 20:50:57 +0100 Message-Id: Subject: Re: [PATCH 1/3] arm64: rust: Enable Rust support for AArch64 From: "Vincenzo Palazzo" To: "Jamie Cunliffe" , , Cc: "Miguel Ojeda" , "Catalin Marinas" , "Will Deacon" , X-Mailer: aerc 0.8.2 References: <20230125163739.3798252-1-Jamie.Cunliffe@arm.com> <20230125163739.3798252-2-Jamie.Cunliffe@arm.com> In-Reply-To: <20230125163739.3798252-2-Jamie.Cunliffe@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_115102_855946_B6B1038C X-CRM114-Status: GOOD ( 20.39 ) 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 On Wed Jan 25, 2023 at 5:37 PM CET, Jamie Cunliffe wrote: > From: Miguel Ojeda > > This commit provides the build flags for Rust for AArch64. The core Rust > support already in the kernel does the rest. > > The Rust samples have been tested with this commit. > > [jcunliffe: Arm specific parts taken from Miguel's upstream tree] > > Signed-off-by: Miguel Ojeda > Co-developed-by: Jamie Cunliffe > Signed-off-by: Jamie Cunliffe Signed-off-by: Vincenzo Palazzo > --- > Documentation/rust/arch-support.rst | 1 + > arch/arm64/Kconfig | 1 + > scripts/generate_rust_target.rs | 13 ++++++++++++- > 3 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/rust/arch-support.rst b/Documentation/rust/arch-support.rst > index 6982b63775da..3776059a385a 100644 > --- a/Documentation/rust/arch-support.rst > +++ b/Documentation/rust/arch-support.rst > @@ -15,5 +15,6 @@ support corresponds to ``S`` values in the ``MAINTAINERS`` file. > ============ ================ ============================================== > Architecture Level of support Constraints > ============ ================ ============================================== > +``arm64`` Maintained None. > ``x86`` Maintained ``x86_64`` only. > ============ ================ ============================================== > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 03934808b2ed..fc3800e82802 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -209,6 +209,7 @@ config ARM64 > select HAVE_FUNCTION_ARG_ACCESS_API > select MMU_GATHER_RCU_TABLE_FREE > select HAVE_RSEQ > + select HAVE_RUST > select HAVE_STACKPROTECTOR > select HAVE_SYSCALL_TRACEPOINTS > select HAVE_KPROBES > diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs > index 3c6cbe2b278d..fe0e4ba54492 100644 > --- a/scripts/generate_rust_target.rs > +++ b/scripts/generate_rust_target.rs > @@ -148,7 +148,18 @@ fn main() { > let mut ts = TargetSpec::new(); > > // `llvm-target`s are taken from `scripts/Makefile.clang`. > - if cfg.has("X86_64") { > + if cfg.has("ARM64") { > + ts.push("arch", "aarch64"); > + ts.push( > + "data-layout", > + "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", > + ); > + ts.push("disable-redzone", true); > + ts.push("features", "+strict-align,+neon,+fp-armv8"); > + ts.push("llvm-target", "aarch64-linux-gnu"); > + ts.push("max-atomic-width", 128); > + ts.push("target-pointer-width", "64"); > + } else if cfg.has("X86_64") { > ts.push("arch", "x86_64"); > ts.push( > "data-layout", > -- > 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel