Message ID | 20230212205506.1992714-4-Mr.Bossman075@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2048880wrn; Sun, 12 Feb 2023 13:04:49 -0800 (PST) X-Google-Smtp-Source: AK7set+t13K59oqf80ecRvdaQygkkdNqM/lcb3ZgIBwDtQZqYfm5Uij9iFaYAD6kLKS99hy4LgBD X-Received: by 2002:a05:6a20:1605:b0:be:9b65:1f82 with SMTP id l5-20020a056a20160500b000be9b651f82mr27403013pzj.25.1676235889523; Sun, 12 Feb 2023 13:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676235889; cv=none; d=google.com; s=arc-20160816; b=nmXI5iNMPMPUAdh73N40N9kj49TAwjadq9Vqi6VGSlGOGSRFUT6vl8rM6BkheHQWtK MG99mLw6yZtp5AgpROrlUlPX7YpvV7Tz2iu3W5ziZwYklxhbmtFETEIMavESl+MHEenH 3vzy72lu2Jmy//8OA+GeiCnMb/2VaMg6Le0Sm7z/4hBVa7N46X+rwJEh2IQE2hhMXoQ+ BrncDBrpZwu0u3oXx5XNSTssnMi8tlZ8DD/8Fyhrcfu8TQmuCY+sJTgAGk0jyzKAoD+P FsZLvcYboIGnbiQHcBuCVnNga3INtU4HeQCoMfHQ7CjbR3Eps0nr31LfW8Xi9esSLCAq K7yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CvWquSrWDihZ0acdWJU0hmpgtyP5vfxrh4ZjBtKv7GY=; b=pPt2B8ixsijdVvmUz2fjZz2jfmzKGg/s+UFvZKpX0Ejd4hw3L+vYPjO5NKy8BPf7j3 W1UZWM2v3JyrHcLPVFHjPPoN2OA4jBUqII18OHHXXDj8G49pk1t4fQY2VlEDoHl6rGZO 4C8p5M5LC2L2tdZawW4DazttdNVC9fc5lBf3dDqroZ7xkDX6LlFZhsf6SCnqpfzpC28P SYuQld8TCvQPfMOkOVcIgEUZ/XHznCghMPRE0ErRhRsXn234mjMTM42JPsXafoZSl8/b 453g+ZT4Tz9uR/MENuvdI9JWEwXOzzzU74uj4pID2Puwhvf2sPRt6fA90ZlilXuuzltO /mCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WNWzEb8T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a63b24f000000b004fb34d1ee1dsi10199672pgo.453.2023.02.12.13.04.36; Sun, 12 Feb 2023 13:04:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WNWzEb8T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbjBLUzT (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Sun, 12 Feb 2023 15:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjBLUzM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Feb 2023 15:55:12 -0500 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62C9AF75D for <linux-kernel@vger.kernel.org>; Sun, 12 Feb 2023 12:55:11 -0800 (PST) Received: by mail-qt1-x835.google.com with SMTP id 5so11919808qtp.9 for <linux-kernel@vger.kernel.org>; Sun, 12 Feb 2023 12:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CvWquSrWDihZ0acdWJU0hmpgtyP5vfxrh4ZjBtKv7GY=; b=WNWzEb8TKQjRiPhehEQX7DRiF0/Z63jHq43yArV/dBCmlAsI1tKxNiT81JcFwOqny0 yu+MxWkK0EunFt8gijrANji4vbcteVxEkBlBDwbebRpUOtoaSGAw4PFS507An51wz8yi n2rcek9j14B+HNpZDw2q1d6n+bpi3CzPQ/5FSHQif1tg8DkbbP4F/gplofGk8Us7wUZP yO7LlAo/6P+ZoYa6POP11pScfnmiLiiIFDDVMQu9HkWKJ3RoV3+hxYBsl7cSXshCNkCx jKAychv4pUqiToMrhSVaWoJWboi4U7GtXMLI+pnJ8w18LFWwXPiroigNwc/lZ1ED1dbk RhUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CvWquSrWDihZ0acdWJU0hmpgtyP5vfxrh4ZjBtKv7GY=; b=CKxZT7dnl97Fj2sflumvMhynQNI3Akh9TYjOSU/YfXVvHXSmgQoYMnrb706OEs0IHT tJZEozc2fzaY7I24zhb/1Bq/NPhg3vBUUOF+NGsWBhdUPu0JgdxhokZqkQzqlM6wTydx icKJv+f4qfm2Bjwrb/ClxT9jZc6QXtsZgzrGp7AUTkfiT0bEpRXE3uCx3/l34gE69Ib3 zed9OetTIIejAPEUFH9ZqK0qgjSxguuwxHUiru2Aw+DHFp5NOi9SMZQpqFQOpRuH6ecP EcZMo1+VEWRc3EgAwVhlROkFv1jIT9ruH4r6OlMf69TTiRcfmGfEFI3UhzLwmkNyj0J5 Z6Uw== X-Gm-Message-State: AO0yUKWTRBigeB+ehfPQzPd8nihSo3X5Zy1tnapwySyTTJXlGcchXhDp 1PwencBOeLSy/RMKXi6FduA= X-Received: by 2002:ac8:5cca:0:b0:3ab:ceb9:10fd with SMTP id s10-20020ac85cca000000b003abceb910fdmr40007531qta.25.1676235310522; Sun, 12 Feb 2023 12:55:10 -0800 (PST) Received: from jesse-desktop.jtp-bos.lab (pool-108-26-182-112.bstnma.fios.verizon.net. [108.26.182.112]) by smtp.gmail.com with ESMTPSA id o62-20020a374141000000b0072ad54e36b2sm8289233qka.93.2023.02.12.12.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 12:55:10 -0800 (PST) From: Jesse Taube <mr.bossman075@gmail.com> X-Google-Original-From: Jesse Taube <Mr.Bossman075@gmail.com> To: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Jesse Taube <Mr.Bossman075@gmail.com>, Yimin Gu <ustcymgu@gmail.com>, Waldemar Brodkorb <wbx@openadk.org>, Albert Ou <aou@eecs.berkeley.edu>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com> Subject: [PATCH v2 3/3] riscv: configs: Add nommu defconfig for RV32 Date: Sun, 12 Feb 2023 15:55:06 -0500 Message-Id: <20230212205506.1992714-4-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230212205506.1992714-1-Mr.Bossman075@gmail.com> References: <20230212205506.1992714-1-Mr.Bossman075@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757660723930558597?= X-GMAIL-MSGID: =?utf-8?q?1757660723930558597?= |
Series |
Add RISC-V 32 NOMMU support
|
|
Commit Message
Jesse T
Feb. 12, 2023, 8:55 p.m. UTC
32bit risc-v can be configured to run without MMU. This patch adds
an example configuration for RV32 nommu virtual machine.
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Cc: Yimin Gu <ustcymgu@gmail.com>
---
arch/riscv/configs/rv32_nommu_virt_defconfig | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 arch/riscv/configs/rv32_nommu_virt_defconfig
Comments
Hey Jesse, On Sun, Feb 12, 2023 at 03:55:06PM -0500, Jesse Taube wrote: > 32bit risc-v can be configured to run without MMU. This patch adds > an example configuration for RV32 nommu virtual machine. There's a patch on the list (I think it came in after you sent v1) that pointed out that the rv32_defconfig in the tree is not actually used if you do `make ARCH=riscv rv32_defconfig`, but instead a make target is used. How would you feel about replacing this final patch with the below? That way rv32_nommu_virt_defconfig would always be kept in sync with the rv64 version. Cheers, Conor. diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 7123511d977c..785d438ae5fe 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -173,3 +173,7 @@ rv64_randconfig: PHONY += rv32_defconfig rv32_defconfig: $(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config + +PHONY += rv32_nommu_virt_defconfig +rv32_nommu_virt_defconfig: + $(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config
On 2/13/23 14:49, Conor Dooley wrote: > Hey Jesse, > > On Sun, Feb 12, 2023 at 03:55:06PM -0500, Jesse Taube wrote: >> 32bit risc-v can be configured to run without MMU. This patch adds >> an example configuration for RV32 nommu virtual machine. > > There's a patch on the list (I think it came in after you sent v1) that > pointed out that the rv32_defconfig in the tree is not actually used if > you do `make ARCH=riscv rv32_defconfig`, but instead a make target is > used. Oh that's interesting. Why is it still int the tree? How would you feel about replacing this final patch with the > below? That way rv32_nommu_virt_defconfig would always be kept in sync > with the rv64 version. Sounds good! The only gripe I have is the nommu_virt_defconfig is not very minimal, but that's not my problem. Thanks, Jesse Taube > > Cheers, > Conor. > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > index 7123511d977c..785d438ae5fe 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -173,3 +173,7 @@ rv64_randconfig: > PHONY += rv32_defconfig > rv32_defconfig: > $(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config > + > +PHONY += rv32_nommu_virt_defconfig > +rv32_nommu_virt_defconfig: > + $(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config >
On Mon, Feb 13, 2023 at 04:44:29PM -0500, Jesse Taube wrote: > > > On 2/13/23 14:49, Conor Dooley wrote: > > Hey Jesse, > > > > On Sun, Feb 12, 2023 at 03:55:06PM -0500, Jesse Taube wrote: > > > 32bit risc-v can be configured to run without MMU. This patch adds > > > an example configuration for RV32 nommu virtual machine. > > > > There's a patch on the list (I think it came in after you sent v1) that > > pointed out that the rv32_defconfig in the tree is not actually used if > > you do `make ARCH=riscv rv32_defconfig`, but instead a make target is > > used. > Oh that's interesting. Why is it still int the tree? See that's the thing - the patch was deleting the rv32_defconfig file: https://lore.kernel.org/linux-riscv/20230205133307.1058814-1-guoren@kernel.org/ > > How would you feel about replacing this final patch with the > > below? That way rv32_nommu_virt_defconfig would always be kept in sync > > with the rv64 version. > Sounds good! The only gripe I have is the nommu_virt_defconfig is not very > minimal, but that's not my problem. > > Thanks, > Jesse Taube > > > > Cheers, > > Conor. > > > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > > index 7123511d977c..785d438ae5fe 100644 > > --- a/arch/riscv/Makefile > > +++ b/arch/riscv/Makefile > > @@ -173,3 +173,7 @@ rv64_randconfig: > > PHONY += rv32_defconfig > > rv32_defconfig: > > $(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config > > + > > +PHONY += rv32_nommu_virt_defconfig > > +rv32_nommu_virt_defconfig: > > + $(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config > >
diff --git a/arch/riscv/configs/rv32_nommu_virt_defconfig b/arch/riscv/configs/rv32_nommu_virt_defconfig new file mode 100644 index 000000000000..460907253a80 --- /dev/null +++ b/arch/riscv/configs/rv32_nommu_virt_defconfig @@ -0,0 +1,16 @@ +CONFIG_BLK_DEV_INITRD=y +# CONFIG_MMU is not set +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_SOC_VIRT=y +CONFIG_NONPORTABLE=y +CONFIG_ARCH_RV32I=y +CONFIG_BINFMT_FLAT=y +CONFIG_SLOB=y +CONFIG_VIRTIO_BLK=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_EXT2_FS=y +CONFIG_PRINTK_TIME=y