From patchwork Tue Mar 7 10:24:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 13163113 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 B69FAC678D4 for ; Tue, 7 Mar 2023 10:25:43 +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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=f8IQot3WAgscaBhscKJx3toUGH0wvVkIgof8sWFA4eM=; b=MGjJwvmih+edmh aNfZyZasaiArdV+kFhku6eyq9ARfYNiAd9rNm1NrHposcqYE/sAKo1+Rz4dGWZxMIvKGfeIcFescF QSacY7rKevizcmLL17c/xgBAoOAASoDt56HndxF8i6NDhue1J/9cY2y9NmvF02MJUC+feiTIN5sqR VvQfSCrGefUrG13WgXHWh4RXwVKaGK5xlDKO/VpOMqAxjEAuo6+kCA+UKE+SFttcajthhAr7Xg2tS S7N+T17X89A9qD69U9pppOBZpGK+ftIyd8bKu12107Sj8jxrf9inoINqEnrVr13pb4PHzXLyRTOpG OdU+r2I3nSs8+H/XsV8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZUVk-00HFHG-AP; Tue, 07 Mar 2023 10:25:36 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZUVa-00HF9A-SQ for linux-riscv@lists.infradead.org; Tue, 07 Mar 2023 10:25:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1678184726; x=1709720726; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OInxuMJtdIyDPn0imEFBCcfPVJWWAD2dQ/VhXFHBFuY=; b=uCVlOl3qRvWuHFqu46He0r/1bPvmKGBMKhE/oPTR4twlvWEkigEynwN3 NE6ZvfopT0UNupr4kkKAOksz2LnDNi2KR3hpGgrJhrDIDOsP40Yc8kOvY l3YuZwHQmj3pvqbgc7mjwlY3fIpuM+61NPscOLXofmarBO55GvNP7XuMO hh5Hfy9ToeZTdTeoP341SG725ksdoqjLNFKct1OricCspXIkh2uy0j/d0 7Qxm6QYGuzi7L8QLIixHB+lQavIMO8aG+4CxTDIWZ4Oj4ZAxg8K1ajt/k E0Z9X1XcviGOSQCtpvxG46VF1BD4VbLSgP+ZO0/FfOoMdJABtnkrwCwEW w==; X-IronPort-AV: E=Sophos;i="5.98,240,1673938800"; d="scan'208";a="140694248" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 07 Mar 2023 03:25:18 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 7 Mar 2023 03:25:15 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Tue, 7 Mar 2023 03:25:12 -0700 From: Conor Dooley To: CC: , , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , "Nathan Chancellor" , Nick Desaulniers , Tom Rix , , , , Subject: [PATCH v1 0/2] RISC-V: enable rust Date: Tue, 7 Mar 2023 10:24:39 +0000 Message-ID: <20230307102441.94417-1-conor.dooley@microchip.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2088; i=conor.dooley@microchip.com; h=from:subject; bh=OInxuMJtdIyDPn0imEFBCcfPVJWWAD2dQ/VhXFHBFuY=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDCnsAs8kPwY+WPDTW83kbZ7n9rULE84/3btU3L1pj9Su+gea apKSHaUsDGIcDLJiiiyJt/tapNb/cdnh3PMWZg4rE8gQBi5OAZhIhAPDP9vQmtgpq6++Ptj9MuPKLd 5J942cmbL2szoy/Ciezv3hViXD//KFmxlmvp0gz2ITs0bPJ+dy7MGQD2/k7rwL1QlWf+3wgRcA X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_022527_039700_C9BBE550 X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org After the authorship debacle on the RFC, I've tried to be even more careful this time around. Gary opted for a Co-developed-by in the replies of the RFC stuff, so I have given them one. I have added SoB's too, but if that is not okay Gary, then please scream loudly. As this is lifted from the state of the Rust-for-Linux tree, the commit messages from there cannot be preserved, so these patches have commit messages that I wrote. I've tested this on Icicle, and the modules seem to work as expected. Unfortunately there appear to be implicit 32-bit divisions (or similar) in core Rust code, so, as in the downstream Rust-for-Linux tree, Rust is only enabled for 64-bit. Thanks, Conor. Changes in v1: - rebase on v6.3-rc1 - resort the `um` entry in the arch-support table while adding RISC-V to it - drop 32-bit bits - have another crack at assigning authorship Changes in RFC-RESEND: - fix the asymmetrical additions in the Makefile bits - add cc-cover to my git send-email command... CC: Miguel Ojeda CC: Alex Gaynor CC: Wedson Almeida Filho CC: Boqun Feng CC: Gary Guo CC: Björn Roy Baron CC: Jonathan Corbet CC: Paul Walmsley CC: Palmer Dabbelt CC: Nathan Chancellor CC: Nick Desaulniers CC: Tom Rix CC: rust-for-linux@vger.kernel.org CC: linux-doc@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-riscv@lists.infradead.org CC: llvm@lists.linux.dev Miguel Ojeda (2): scripts: generate_rust_target: enable building on RISC-V RISC-V: enable building 64-bit kernels with rust support Documentation/rust/arch-support.rst | 3 ++- arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 2 ++ scripts/generate_rust_target.rs | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-)