diff mbox series

[v2,3/3] riscv: configs: Add nommu defconfig for RV32

Message ID 20230212205506.1992714-4-Mr.Bossman075@gmail.com (mailing list archive)
State Superseded
Delegated to: Palmer Dabbelt
Headers show
Series Add RISC-V 32 NOMMU support | expand

Checks

Context Check Description
conchuod/cover_letter success Series has a cover letter
conchuod/tree_selection success Guessed tree name to be for-next
conchuod/fixes_present success Fixes tag not required for -next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 13 and now 13
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 0 this patch: 0
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig success Errors and warnings before: 0 this patch: 0
conchuod/alphanumeric_selects success Out of order selects before the patch: 59 and now 59
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 2 this patch: 2
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch warning CHECK: From:/Signed-off-by: email comments mismatch: 'From: Jesse Taube <mr.bossman075@gmail.com>' != 'Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>' WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
conchuod/source_inline success Was 0 now: 0
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success No Fixes tag
conchuod/build_rv64_nommu_virt_defconfig success Build OK

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

Conor Dooley Feb. 13, 2023, 7:49 p.m. UTC | #1
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
Jesse T Feb. 13, 2023, 9:44 p.m. UTC | #2
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
>
Conor Dooley Feb. 13, 2023, 9:48 p.m. UTC | #3
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 mbox series

Patch

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