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 D3AAAC54E94 for ; Wed, 25 Jan 2023 19:58:01 +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=NIVJHajQP/+u0doC6sEV78tD50vajUhVdCHtUbfcvzY=; b=WpRirap+jUb8ZT 5jTAS/wbCh8hMbG41vPLdzoaW4Bn+cXUFwEwH6NvmRDvWFv3mOIzfZdYt4JMhnrroBFyS7x28Xq5n 6g4TAN0wN5tyLcu+6O3+jgEABKj00XsKBQDnvYMyUB4245XCZLe50zrRx+36r1Ws0B8nvIpppVmSf qWXujKwB0W1saOSlh9RY4u89bc21/RWJ0y1qyfQOj3M2wvoidcDZmmR0AYN2xmT06MjkCr7l0aLyO wTGtNwioE2k7ZrVxTVIXPhAHtX7jKyJkOZPQ8EYMGwoG4VlcDoNrvR8rKkrii4myMlM/bZA14u/XI 7upAZXbFQShsRgwRNkEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKltP-008WAN-5W; Wed, 25 Jan 2023 19:57:11 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKltL-008W6Q-CY for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 19:57:08 +0000 Received: by mail-ej1-x62a.google.com with SMTP id kt14so50698401ejc.3 for ; Wed, 25 Jan 2023 11:56:59 -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=R/n7FMw2izoFAF0zF8gcPKkWqw/ikmCn+hkqZ0Ews2g=; b=cFg56iOHRqis/dwdI6BH8bz5bPYmpDKNdDzacZZ5PuB77sm7QXW0+JHkv3jzqbNwS2 iXKrExGT5QCEAtDpLaI76L8j13kOA+pkT8HHZo/DPqnDwZGjrUK8XBvC/puOw4osrBjt UMvJuvVzXSngPybZm/MokPsp/usH3DatLQ6TiIQsUufSP0WC72RFzQwcF67CWLoKl7ZK LXZMuCJWRNyJgyBYmLXm0R453RoE/zgDHq+SvCOuqMVFe4ofw8RaLAnBok0cn75HQEsw PvaBr5FPQOsY37o7J121I7GvPtQ1Lze85XjYeYBH5BJPV+xC4SsgM4XBUJXkkjTiFdBF FEoQ== 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=R/n7FMw2izoFAF0zF8gcPKkWqw/ikmCn+hkqZ0Ews2g=; b=7gKRQizII3OkpHeLULZL60xZS1CjUcCU62FJIdtUzsNdWJPDFom6psaosnEtgWmjG/ tSCZurCCVUthM1FraA3DLCQNdPLP5jyzuJwwKDsbnHw/YPy/STRdNKVuriSTrJcLnDK9 as28zU/tkLpIiBO282MR2BnTN7RtvRjhym0+ajricQcOAek4cPySO2eDS5QJljX9+fhB hPThrOIha+rN8sUsFIx0k/eoq8znKgyvCVxmfAGzFQ9z8k3ZqVC6RUHNMjHCt327KlZW hFHoIYzwjhTcNQGdIccSFt/3xWo9CSUQPueSXWQrJ4lWyTv8PZObdg8405iUkDBE+/d2 sSJg== X-Gm-Message-State: AFqh2kooMr8dHX0F1ux1OmYOl0N+ty/kbpB2x3wHzsWovrUdMXnsrc3O VBH56Xw0ft15S0zxOpRsrDE= X-Google-Smtp-Source: AMrXdXvq5RRP7rjWclvuNBkqegNVTBtmzcGUGgLTUU8M1j9FDHfr3xpd87/u8Wq3+ObGUAbZMAc+KQ== X-Received: by 2002:a17:907:a506:b0:873:901:4f23 with SMTP id vr6-20020a170907a50600b0087309014f23mr39013543ejc.24.1674676618170; Wed, 25 Jan 2023 11:56:58 -0800 (PST) Received: from localhost ([2001:b07:5d37:537d:484e:dc99:ec59:4292]) by smtp.gmail.com with ESMTPSA id ka11-20020a170907990b00b007aea1dc1840sm2759233ejc.111.2023.01.25.11.56.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 11:56:57 -0800 (PST) Mime-Version: 1.0 Date: Wed, 25 Jan 2023 20:56:56 +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_115707_471749_38AF96CC X-CRM114-Status: GOOD ( 20.29 ) 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 Reviewed-by: Vincenzo Palazzo P.S: wrong answer template in the prev mail :) > --- > 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