Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp166432lqj; Wed, 10 Apr 2024 07:13:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGBFCbDEFLUHJkGiODB1eiy4s9G0PMVVMlRHzPEcz6ZfxJkPa6yD9AOBhqScpmSQ3jBJ9pECChBwCLReVqMVvY44gMQCp/sXoYIrZewg== X-Google-Smtp-Source: AGHT+IHpBHY4d3smZhdaLIy1Flnyqa+ncRz38GqJF/MxI83xN5OITx5kSljIDRTZqFgrbCG5ydnr X-Received: by 2002:a17:902:e746:b0:1e3:e242:4dc9 with SMTP id p6-20020a170902e74600b001e3e2424dc9mr3393787plf.33.1712758438064; Wed, 10 Apr 2024 07:13:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712758438; cv=pass; d=google.com; s=arc-20160816; b=azqmThbAlThCJLZMTzDH2TBxLHaQwkICHO8eSiOPQmz0kiFchqQxeutju8gCeKAyww qKvVjdWfcZpVBgwq2d4vJem0GHAZ7xf6R0me5f6UFfat8TVhSoX5LkQAu3oKHYhhYr89 B57iRsoaT6Hql3meXGYnayD8NGqPZT4MJ4vyXT7LkqW8ma1DXumwPK8jMgH+cMIJc2p0 pSYKRcHLPpG9/9ejjb+PY51Sm8ykrSNaWVrn9QIuxylpFgF4ZVvxkiVpQDxWTjpnyb9o SEdvtJRJmhB5vZkBIaoUKgY6QXycqUYuDZuxLlHmL6lYu55DvsYckvChCT6XHGCHcPV4 A4hg== 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:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=03D0DQleB9vxk8wekat4Pmx/RVLXpwIuxViW/1q3BPE=; fh=9jVGzhAgnoifOaDnH50qYhRor/VQEqQviJ5kKNFH4A4=; b=FGf74YhWeXO9Vtse0hNEbWZeSk0fik5kuGP3XXY2Q1BJKnoS0C2wIY7H66LixK3Gxo NyjERJST23CFs8tEgDx/ALV2soj7PxDqijgiivwyrVKjOVuaAPuXtPjtzkJUD5CpHZ1B OYa954L39wyXvJuLDkPMdElUAHrk01puQah3UrQJnloJAgSZEsNEjPKtHxpm6Y/bz/n8 vKK9jmlIPI6t8wpu/hBt85A2I1UIteLdE8d0yd3+4bDcrQxmaIIvIOxLkaMv9GXbvtzl Y2N0HFv9+4qE27B68GdYx7/m/6AS4vvhCnEKPh++rcFcQ3MjSVf6sh0sYA+TJwoqvtjC Yprg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPub9SDT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e12-20020a170902784c00b001e2408c6df1si10707892pln.354.2024.04.10.07.13.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 07:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPub9SDT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138591-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 170DBB2C92D for ; Wed, 10 Apr 2024 13:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D98215EFC3; Wed, 10 Apr 2024 13:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cPub9SDT" 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 8993815ECD2; Wed, 10 Apr 2024 13:22:44 +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=1712755364; cv=none; b=COI0WN0pijHgZYQY3fG5wPMz3lKa9/hmW4ateSjdvxxVO9by3gpL1ctsS7i3vODtxU+zQST8Wmc3wS1aov0C/7JbHfK277SZbw9tf1isgrGZNVWo+02kfgiP4WoBZNY+mOxCy0CUJxARdArwAfP7Gjx30rtbRol4qANb19y1IMk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712755364; c=relaxed/simple; bh=03D0DQleB9vxk8wekat4Pmx/RVLXpwIuxViW/1q3BPE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=CnQr18+SNjO7Rdyq5Zpg4f52quwewq+38ykfmpJhVCNDeUMd5lzKaXB7fWdrQp6JqHuK4w25QJWe88eAhqeR9TjBBc5xzGJzwXPq9ftCLC2wJh6bEhqLHauCsE+y/ZZpu8YH+ATeu4aIFibf41h9Ps50cJSNedbgpbFF7pa8jVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cPub9SDT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98FF6C433C7; Wed, 10 Apr 2024 13:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712755364; bh=03D0DQleB9vxk8wekat4Pmx/RVLXpwIuxViW/1q3BPE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cPub9SDTJInpTD3h3i5Bm0XMXXDO2+Pu3RoVexjDEgpyIom8aOKTpUnOi2fKfG0v/ Z21+mTqNAwQ3B0ZxoDkdf+ioemD5P4CiEswiaqPYR2YMFl0r6A7CF6u2sRUasBR0fI q3A3FvUeBdN0WnAVvvxKzvY9zqoV+OKEv93rhNpW8YB4lul59+n6aXt7SE73+lxvAm UUp6giFw1XTo2UdIUxitRqf07eVX36sLFl2qCFX3CNINltqlz6x/1WSFC209Y5iFfx f9yEfchlx+Wdet8CZIpQ7odYqnkYwAV2OIENdLL2IhQRy+7gqbGhgMQRycR3Pyrrb5 3f7InogKyfqbQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Conor Dooley , 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 , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v3 0/1] RISC-V: enable rust In-Reply-To: <20240409-unsaddle-skittle-c93eb77732bb@spud> References: <20240409-unsaddle-skittle-c93eb77732bb@spud> Date: Wed, 10 Apr 2024 15:22:40 +0200 Message-ID: <871q7d73of.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Conor Dooley writes: > From: Conor Dooley > > I've intentionally not turned on the gcc support, as discussed on > v1. I've also switched over to using the target, but it is a bit heavier > than the one arm64 seems to be using. RISC-V has fewer targets available > and this was the closest. I preserved the redzone disabling, just moved > into the Makefile. Any comment from Gary or the LLVM lads on the target > would be great I think: > https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/s= pec/targets/riscv64imac_unknown_none_elf.rs > arm64 is using: > https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/s= pec/targets/aarch64_unknown_none.rs > > I was gonna send this yesterday, but found out last minute I had invalid > code in the target generation script. The kernel test robot had given my > branch the global all-clear - the rust coverage with all the > "depends on !FOO" must really limit the build coverage. I built for x86 > with rust enabled locally this time to make sure.. > > As this as 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. Nice, works with my simple test on VisionFive 2 as well! Cool to have Rust support in! Now, BTF just needs to be supported, and I can have Rust *and* BPF in my kernels! :-P \o/ Tested-by: Bj=C3=B6rn T=C3=B6pel