From patchwork Fri Feb 23 13:38:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 20867 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp588653dyb; Fri, 23 Feb 2024 05:39:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+km/Hk3aPHnmPrhR0IsPdzok4JaSsBJauD0G+4NA0ANERh2LafykofuSN3jOlHrXFu23n9g0M/1mA9IeQBkpWGih2kQ== X-Google-Smtp-Source: AGHT+IG0uu9g9/5tfh+TeyrhVIRj71cbp/nTPRTOzIqkVTzR29n3TSq5Et03Emkm3CLLmxy2Es6m X-Received: by 2002:a05:6102:304c:b0:470:575a:5a1f with SMTP id w12-20020a056102304c00b00470575a5a1fmr2280377vsa.30.1708695558966; Fri, 23 Feb 2024 05:39:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708695558; cv=pass; d=google.com; s=arc-20160816; b=zyBA0zY5iWgQKFHRpNIbVw3ll0iWPo0lZeti01Tx0A1ERoYwCJ7++BQ89t7huj2ehi PSgO2lfOszq0PXiAWIlrO+2joE0Wf2aI5/fRZjLoA0YWuFQT++81exFEZSzs9CLGAHU+ Uvw+QjbJGvYewqxAJLwjsGk3uUJBwsaJUj0kKiVy0L8KxtqD42XTFfjraPHOvF9HGVTs nCLHTLCrS6jjWJFgyQYCX+5O2u8bHpRLFVgu3Oiu9AfuBIXQoIdvcJGGPVhfkueWnA2/ jXBSzlL13kmrHbJA5nL9jl2WZCcsNZT5lnxJp9ie/fG+/K9OS8o+WwdTfxbRRJSXrysd //Bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Yxh0YnaSn4qErPaS+tfZwKldZe6T353wynKTJ5mrvvE=; fh=dCTP4Ymdp7PEyus72y/np7wEnm5YMONLCB550f4Y5pY=; b=ykMMgur+s1J2WFfs8tibzxXw8LSSz95tXEWWVqOf9duClRiA2RpR9xLmEUZuVos/Qm x/OL+8oNlR/Iq214ETewD/KLrMxCvAAPh7XWc0f2X04e78L1S+ZJMz2XucaiqT4dYKW1 xD5r2wTCVFzfm03MwQPluf9dHosmjXRqXPEb7J/CsSyBYorFqtSNdsOK/FhLONPYTs5k MXo0YLk0ktwoQSErbh5C23dLc+i71i2rQJAhKX0Vip6nDBMf9e9lJ3/E6gcBFk9O9ROC zib9udrF3LIVGldGXqkJi/jioES4//Sjd9AUWNJ+HWIuyLa6RlLgEdL7sbyS+wlxno3F CNFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XoneYX3f; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78391-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78391-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u12-20020a0562141c0c00b0068fb82329f8si3936175qvc.598.2024.02.23.05.39.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 05:39:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78391-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XoneYX3f; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78391-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78391-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BDB1C1C21B7C for ; Fri, 23 Feb 2024 13:39:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0008A7F49B; Fri, 23 Feb 2024 13:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XoneYX3f" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571FF22EF5; Fri, 23 Feb 2024 13:38:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708695513; cv=none; b=l6yJOws4LG4tdnZd7Mh1MDeilqd0yuGsbMAJGLJ+9jLrxVe33VICP1Ii3MFczulx+BIVDOf6W1cNeOTETiI0sqJIljGgA7eouPTLKNl8l3zQsN7rrpnAMRgXyVv0p6vbUZ5LgZH5V7JIxf90b4pLZS0VdnE4jzth8xLd2smIB/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708695513; c=relaxed/simple; bh=7Fsxt5dUnwFrhpCWGP+0Mujqc3o+HtSLor3KISLhljg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=rHyeOywPwIUpltgLSeeKB+EgZPjzj0wdIlaeO3Uhr7Iwje6fOTPufwuIfXSFMThO6VLnKGlZY1H7PiEPtU/W5WoS0SmGpxaKp2hO/ufxa+Y8BEo15UKkbTDWzE1tnh76IPckIl7vM69qYHLyojQtoOvTh+5D3eQG+IIJLiU0fQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XoneYX3f; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B284C433C7; Fri, 23 Feb 2024 13:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708695513; bh=7Fsxt5dUnwFrhpCWGP+0Mujqc3o+HtSLor3KISLhljg=; h=From:To:Cc:Subject:Date:From; b=XoneYX3fUtHPv/QtDZAlU3gHMtogjPJMXJG0fKir4kkVyqoMQML0T7gyb5110b4YG KUCFwNlKqmsZfwbRrzD+8/a5t4Sa8LL+rwEElpO28omgZQxBqNIUxl/wsiDpL/xzx7 Ilrf3jD1w7e0snf14FHGxB9DyjgiYQTFh5ib2D2zquDh7vx84D/bCQn9SV+D7+8Zxj UZFUmE3hQjFv6Z45O9WScBCiiqz4Lwe3ukGIUCXfeWptMwU1lhroo4BEXI53pRWgr2 nS7b1DRD0guVYixLerEMCwstXo8isimJ2KLRjToXNVws/oXu95oIXDY63mgKD1Sx3A BPUJChTRrtryQ== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , 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 , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v2 0/3] RISC-V: enable rust Date: Fri, 23 Feb 2024 13:38:02 +0000 Message-ID: <20240223-leverage-walmart-5424542cd8bd@spud> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2176; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=Q8gmemx8ug1xAd70cV163zIEsT6BGWLzhKHazmMK2rg=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDKk35u95x9GhKR107q3o3E9S/JuMvfbMDNu+5IpYxtQMh sazwsHsHaUsDGIcDLJiiiyJt/tapNb/cdnh3PMWZg4rE8gQBi5OAZjI0kRGhr+fNvi/eLe2Xc6q o/h1Wg/PNvEtmt4G9+2XSp20c7VI/c/wi1lP9lxgrcS6zU92qRf1vp5zZNu/oh16AUHhxyf8uh+ xmw0A X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791697154603929253 X-GMAIL-MSGID: 1791697154603929253 From: Conor Dooley Now with a patch to disable RUST if CFI_CLANG is enabled. I've also intentionally not turned on the gcc support, as discussed on v1. As this was 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 v2: - Rebase, since a good bit of time has passed! - Add the extra patch, disabling when CFI_CLANG is enabled. 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 Conor Dooley (1): rust: make mutually exclusive with CFI_CLANG 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 | 1 + arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 2 ++ init/Kconfig | 1 + scripts/generate_rust_target.rs | 16 ++++++++++++++++ 5 files changed, 21 insertions(+)