Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp348806lqh; Tue, 7 May 2024 00:25:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWg6tWuxE45lkWYfUFcQWDUhZldAct8T7a9Frr6fBsksC57L2LiY8Yt55UWaqlAjAduIu9OXeHrSreVjvZN9lBA7dstWSovf4FlCLat6Q== X-Google-Smtp-Source: AGHT+IEqtjr7HMYkrBusrPVhgFIW9puemFYV1R293ZYScvkq2LLakLH7OYyE+7br4Xahv+3qC9Uo X-Received: by 2002:a17:903:298f:b0:1eb:5222:7c5f with SMTP id lm15-20020a170903298f00b001eb52227c5fmr15750729plb.10.1715066724936; Tue, 07 May 2024 00:25:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715066724; cv=pass; d=google.com; s=arc-20160816; b=UAr0YpjslWwXiu5ycKyKdHqCnBCoZDA+xn5RwZXRm0brGNDvQim8lRN32s6b/YtWLN Ts93Xoaqw/bmwzPLrOGO3T2ozMVk8RFPegICCtbPctm11UQt3bEZ6Q+NIcie9X9oy8gT Yko2NrVoHHi2v9U3F47TozPzDQ0qrft56QM0lDzYGNkbxJtcGUYjYoOjoZoR+jQbX6X/ Y5rRXlAfUX2uLnaBeMzFRXGiCxmqbYU7Mqb1A+fTJFjhvOwyvVzkSIB1gdECUFi2sMUw yxnhMrSenbaYqwhvxPhvkw2hNbxbSAvxqu0NxIoxmIkKBGmWXDgPBBhowQgIRtIK9nup qC9Q== 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:references:in-reply-to :user-agent:subject:cc:to:from:date:dkim-signature; bh=5LHpSYb/oQlQ9SZLdNI2vc/n5i5jUezRt6IqbRpfMgE=; fh=qb6NqJ6SgyD7B+FKnxaqAOmSvktgMH7MGpUs/vUrxkA=; b=NcVgkFOS+lXOz57VuVEkXxow4FBAuE5JkYzsbsLpowQRO8ruP49t4TD6L47xrluz4A lEgfOkaUzTIYDrNpvHxlRBfkSd/KUbJE9CICPFCrffmrH0wk6Sev0mEVqUKLjIxVfg8h I8+DYScgEoNQXeJHNXArEpFpuhmmSvdcJlK7ndwJv2iH0/CdGKZrNAiWydY+rE1e9Qfa KIMgTqadawXaJqoaabUskShS0lmRqFvTUtvyW5POhclqq/Z6KdbbBhqqCoWwcMUCyT/I iooScDuxWnSryk0+j5r5r7jDEE5s880qjSp0It86T4tL+coZVIHRKjhA9o5+Ony+FdF7 7vVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FY5iYGis; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170813-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. [147.75.48.161]) by mx.google.com with ESMTPS id l5-20020a170903244500b001ec82abd87csi9763984pls.550.2024.05.07.00.25.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FY5iYGis; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170813-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 2B0ACB21696 for ; Tue, 7 May 2024 07:25:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9CAF13B7AF; Tue, 7 May 2024 07:25:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FY5iYGis" 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 160D13D0BD for ; Tue, 7 May 2024 07:25:11 +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=1715066712; cv=none; b=lnbkLkEwwkYUxiyDc7ThKJEpWRdB+zV/gQCXpEJt6jg9+aj3eb2XOR3/9sCLgcdiAjSfYJJt6lH1DLJ88FgqtyDPS1aTCnYNl26DWLJnm6eMmOGVhXKFBxd2g0FbbVHdnb96xAw/ChV8XfqC0TQPgFjcDZAD/NATYkiIkn/WxZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715066712; c=relaxed/simple; bh=Gs3j7oXYZ/cnYw3Tvuveo6X7cpNx8lLk7xv/YA5SssY=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=WGxy+ttZpIp6IitnESSkCEsBEjIv1q0qmv+hcpP6ovz2H1v2JRINV7uqPlnMg8jufFuHfAfh2kOf0VCFxty08J0xx2V9LlK+Tg2+bGiAMnCj6w5a0xmRg980uRifwmK/HMrJpGWGDoEb943KKrNQ0T7i3mqMHlzUnK6GjHdgV5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FY5iYGis; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D28A5C2BBFC; Tue, 7 May 2024 07:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715066711; bh=Gs3j7oXYZ/cnYw3Tvuveo6X7cpNx8lLk7xv/YA5SssY=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=FY5iYGishy4InMmdRopsf1fysYX4wjmy+Af5T4ogIpLQyIQhMSTNdQF1ns6VjyAwO 5uF6LQMYTKXg1CipA+pKvbo7oCz0jKGsff1lialhFUkztmWTNNEFDv9agnmXEDOLWZ YelITmVmKQdp94GinpG7y1q92sxn2h93lJ4i+xSvEBQ2Nh3ZcqIqir2GS9Yg8DQEHj 8KbzWOOlyYaZ7+tG4TKiRoIa6dy/1Z/2Kl5KlNsk1VDhyBqK47ZOCyMiCZaOkNNQxX K3qypsB4GiaM/G/vUagj3i5zjMkUyEApm4xkQL3YDZOZKwrWU0ajgbiS2YPmch9w1p WaLXxbT6PRu1w== Date: Tue, 07 May 2024 08:25:09 +0100 From: Conor Dooley To: Charlie Jenkins , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Song Liu , Xi Wang , =?ISO-8859-1?Q?Bj=F6rn_T=F6pel?= , =?ISO-8859-1?Q?Cl=E9ment_L=E9ger?= CC: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/8] riscv: Support compiling the kernel with extensions User-Agent: K-9 Mail for Android In-Reply-To: <20240506-compile_kernel_with_extensions-v1-0-5c25c134c097@rivosinc.com> References: <20240506-compile_kernel_with_extensions-v1-0-5c25c134c097@rivosinc.com> Message-ID: <12808AB2-0308-4013-9624-E3DEFCC584EA@kernel.org> 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 Hey Charlie, On 7 May 2024 02:40:41 IST, Charlie Jenkins wrote= : >The kernel currently has the restriction that it can only be compiled >with the extensions that are hardcoded in arch/risc/Makefile=2E > >Any extension that is not listed in the Makefile can still be used by >explicitly writing the assembly and using alternative patching=2E > >This series introduces Kconfig options that allow the kernel to be >compiled with additional extensions=2E One thing I don't see in the commit messages or the cover letter is what y= our actual motivation is for making these changes=2E Are you effectively looking to evaluate the alternatives at build time, or= are you looking to let the compiler use the extension where it sees fit? Or perhaps both? Thanks, Conor=2E > >Signed-off-by: Charlie Jenkins >--- >Charlie Jenkins (8): > riscv: Add PLATFORM_MAY_SUPPORT_RISCV_ISA_C Kconfig option > riscv: Add PLATFORM_MAY_SUPPORT_RISCV_ISA_V Kconfig option > riscv: Add PLATFORM_SUPPORTS_RISCV_ISA_SVNAPOT Kconfig option > riscv: Add PLATFORM_MAY_SUPPORT_RISCV_ISA_SVPBMT Kconfig option > riscv: Add PLATFORM_SUPPORTS_RISCV_ISA_ZBB Kconfig option > riscv: Add PLATFORM_SUPPORTS_RISCV_ISA_ZBA Kconfig option > riscv: Add PLATFORM_SUPPORTS_RISCV_ISA_ZBC Kconfig option > riscv: Add PLATFORM_SUPPORTS_RISCV_ISA_ZBS Kconfig option > > arch/riscv/Kconfig | 135 +----------- > arch/riscv/Kconfig=2Eisa | 393 ++++++++++++++++++++++++++= ++++++++ > arch/riscv/Makefile | 15 +- > arch/riscv/crypto/Kconfig | 14 +- > arch/riscv/include/asm/arch_hweight=2Eh | 33 +-- > arch/riscv/include/asm/checksum=2Eh | 18 +- > arch/riscv/include/asm/pgtable=2Eh | 3 +- > arch/riscv/include/asm/simd=2Eh | 3 + > arch/riscv/include/asm/vector=2Eh | 3 +- > arch/riscv/kernel/cpufeature=2Ec | 3 +- > arch/riscv/kernel/head=2ES | 8 +- > arch/riscv/kernel/probes/uprobes=2Ec | 2 +- > arch/riscv/kernel/process=2Ec | 14 +- > arch/riscv/kernel/ptrace=2Ec | 6 + > arch/riscv/lib/csum=2Ec | 48 ++--- > arch/riscv/lib/riscv_v_helpers=2Ec | 1 - > arch/riscv/lib/strcmp=2ES | 4 +- > arch/riscv/lib/strlen=2ES | 4 +- > arch/riscv/lib/strncmp=2ES | 4 +- > arch/riscv/lib/uaccess_vector=2ES | 2 + > arch/riscv/lib/xor=2ES | 2 + > arch/riscv/net/bpf_jit=2Eh | 8 +- > 22 files changed, 511 insertions(+), 212 deletions(-) >--- >base-commit: 2f47357557b7aa98d9d9002688aae480864ca3f6 >change-id: 20240429-compile_kernel_with_extensions-92dd2403d325