diff mbox series

[02/13] riscv: Fixup difference with defconfig

Message ID 20211221163532.2636028-3-guoren@kernel.org (mailing list archive)
State New, archived
Headers show
Series riscv: compat: Add COMPAT mode support for rv64 | expand

Commit Message

Guo Ren Dec. 21, 2021, 4:35 p.m. UTC
From: Guo Ren <guoren@linux.alibaba.com>

Let's follow the origin patch's spirit.

The only difference between rv32_defconfig and defconfig is that
rv32_defconfig has  CONFIG_ARCH_RV32I=y.

This is helpful to compare rv64-compat-rv32 v.s. rv32-linux.

Fixes: 1b937e8faa87ccfb ("RISC-V: Add separate defconfig for 32bit systems")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Anup Patel <anup.patel@wdc.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
---
 arch/riscv/configs/rv32_defconfig | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

Comments

Arnd Bergmann Dec. 21, 2021, 5:09 p.m. UTC | #1
On Tue, Dec 21, 2021 at 5:35 PM <guoren@kernel.org> wrote:
>
> From: Guo Ren <guoren@linux.alibaba.com>
>
> Let's follow the origin patch's spirit.
>
> The only difference between rv32_defconfig and defconfig is that
> rv32_defconfig has  CONFIG_ARCH_RV32I=y.
>
> This is helpful to compare rv64-compat-rv32 v.s. rv32-linux.
>

If the intention is to keep them in sync, maybe use a fragment for 32-bit
mode, like powerpc or mips do.

      Arnd
Guo Ren Dec. 22, 2021, 11:34 a.m. UTC | #2
On Wed, Dec 22, 2021 at 1:09 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Dec 21, 2021 at 5:35 PM <guoren@kernel.org> wrote:
> >
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > Let's follow the origin patch's spirit.
> >
> > The only difference between rv32_defconfig and defconfig is that
> > rv32_defconfig has  CONFIG_ARCH_RV32I=y.
> >
> > This is helpful to compare rv64-compat-rv32 v.s. rv32-linux.
> >
>
> If the intention is to keep them in sync, maybe use a fragment for 32-bit
> mode, like powerpc or mips do.
>
>       Arnd

Some people are familiar with "make rv32_defconfig". There has a
32-bit.config fragment config in arch/riscv/configs/.

I've tested with:

make ARCH=riscv CROSS_COMPILE=riscv32-buildroot-linux-gnu-
EXTRA_CFLAGS+=-g O=../build-rv32/ defconfig 32-bit.config

The above is tested Okay, do you mean we should delete rv32_defconfig?
I think it's another topic, I just want them the same in "compat"
patchset.
Arnd Bergmann Dec. 22, 2021, 11:44 a.m. UTC | #3
On Wed, Dec 22, 2021 at 12:34 PM Guo Ren <guoren@kernel.org> wrote:
> On Wed, Dec 22, 2021 at 1:09 AM Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tue, Dec 21, 2021 at 5:35 PM <guoren@kernel.org> wrote:
> > If the intention is to keep them in sync, maybe use a fragment for 32-bit
> > mode, like powerpc or mips do.
>
> Some people are familiar with "make rv32_defconfig". There has a
> 32-bit.config fragment config in arch/riscv/configs/.
>
> I've tested with:
>
> make ARCH=riscv CROSS_COMPILE=riscv32-buildroot-linux-gnu-
> EXTRA_CFLAGS+=-g O=../build-rv32/ defconfig 32-bit.config
>
> The above is tested Okay, do you mean we should delete rv32_defconfig?
> I think it's another topic, I just want them the same in "compat"
> patchset.

I think what you can do is to add rv32_defconfig as a target in
arch/riscv/Makefile the same way as rv32_randconfig, and then
delete the other file, that will keep the existing process working
for any existing users.

Given that there are no specific rv32 SoC implementations supported
by the kernel today (other than SOC_VIRT), the number of users
would be close to zero anyway.

       Arnd
Guo Ren Dec. 22, 2021, 1:06 p.m. UTC | #4
On Wed, Dec 22, 2021 at 8:51 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Dec 22, 2021 at 12:34 PM Guo Ren <guoren@kernel.org> wrote:
> > On Wed, Dec 22, 2021 at 1:09 AM Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Tue, Dec 21, 2021 at 5:35 PM <guoren@kernel.org> wrote:
> > > If the intention is to keep them in sync, maybe use a fragment for 32-bit
> > > mode, like powerpc or mips do.
> >
> > Some people are familiar with "make rv32_defconfig". There has a
> > 32-bit.config fragment config in arch/riscv/configs/.
> >
> > I've tested with:
> >
> > make ARCH=riscv CROSS_COMPILE=riscv32-buildroot-linux-gnu-
> > EXTRA_CFLAGS+=-g O=../build-rv32/ defconfig 32-bit.config
> >
> > The above is tested Okay, do you mean we should delete rv32_defconfig?
> > I think it's another topic, I just want them the same in "compat"
> > patchset.
>
> I think what you can do is to add rv32_defconfig as a target in
> arch/riscv/Makefile the same way as rv32_randconfig, and then
> delete the other file, that will keep the existing process working
> for any existing users.
Good idea, I would try.

>
> Given that there are no specific rv32 SoC implementations supported
> by the kernel today (other than SOC_VIRT), the number of users
> would be close to zero anyway.
I really agree with you, but we still need the rv32 user mode
ecosystem for memory footprint.

>
>        Arnd
Arnd Bergmann Dec. 22, 2021, 1:30 p.m. UTC | #5
On Wed, Dec 22, 2021 at 2:06 PM Guo Ren <guoren@kernel.org> wrote:
> On Wed, Dec 22, 2021 at 8:51 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > On Wed, Dec 22, 2021 at 12:34 PM Guo Ren <guoren@kernel.org> wrote:
> > Given that there are no specific rv32 SoC implementations supported
> > by the kernel today (other than SOC_VIRT), the number of users
> > would be close to zero anyway.
> I really agree with you, but we still need the rv32 user mode
> ecosystem for memory footprint.

Sure, I just meant there are few users that would have to relearn typing
"make defconfig 32-bit.config" instead of "make rv32_defconfig" even
without the added Makefile target.

         Arnd
Guo Ren Dec. 23, 2021, 2:12 a.m. UTC | #6
On Wed, Dec 22, 2021 at 9:52 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Dec 22, 2021 at 2:06 PM Guo Ren <guoren@kernel.org> wrote:
> > On Wed, Dec 22, 2021 at 8:51 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Wed, Dec 22, 2021 at 12:34 PM Guo Ren <guoren@kernel.org> wrote:
> > > Given that there are no specific rv32 SoC implementations supported
> > > by the kernel today (other than SOC_VIRT), the number of users
> > > would be close to zero anyway.
> > I really agree with you, but we still need the rv32 user mode
> > ecosystem for memory footprint.
>
> Sure, I just meant there are few users that would have to relearn typing
> "make defconfig 32-bit.config" instead of "make rv32_defconfig" even
> without the added Makefile target.
Emm... I got you.

Next version, I would send delete rv32_defconfig patch. If Palmer
object, I would change to make rv32_defconfig target. ;)

>
>          Arnd
diff mbox series

Patch

diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
index 6e9f12ff968a..d858906cff2d 100644
--- a/arch/riscv/configs/rv32_defconfig
+++ b/arch/riscv/configs/rv32_defconfig
@@ -1,3 +1,4 @@ 
+CONFIG_ARCH_RV32I=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_NO_HZ_IDLE=y
@@ -16,7 +17,7 @@  CONFIG_EXPERT=y
 CONFIG_BPF_SYSCALL=y
 CONFIG_SOC_SIFIVE=y
 CONFIG_SOC_VIRT=y
-CONFIG_ARCH_RV32I=y
+CONFIG_SOC_MICROCHIP_POLARFIRE=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_VIRTUALIZATION=y
@@ -41,10 +42,12 @@  CONFIG_PCI=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCI_HOST_GENERIC=y
 CONFIG_PCIE_XILINX=y
+CONFIG_PCIE_FU740=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_VIRTIO_BLK=y
+CONFIG_BLK_DEV_NVME=m
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_DEV_SR=y
 CONFIG_SCSI_VIRTIO=y
@@ -68,11 +71,14 @@  CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_SPI=y
 CONFIG_SPI_SIFIVE=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SIFIVE=y
 # CONFIG_PTP_1588_CLOCK is not set
 CONFIG_POWER_RESET=y
-CONFIG_DRM=y
-CONFIG_DRM_RADEON=y
-CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_NOUVEAU=m
+CONFIG_DRM_VIRTIO_GPU=m
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
@@ -83,6 +89,9 @@  CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PLATFORM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_UAS=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_CADENCE=y
 CONFIG_MMC=y
 CONFIG_MMC_SPI=y
 CONFIG_RTC_CLASS=y
@@ -105,6 +114,8 @@  CONFIG_NFS_V4_1=y
 CONFIG_NFS_V4_2=y
 CONFIG_ROOT_NFS=y
 CONFIG_9P_FS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
@@ -133,3 +144,4 @@  CONFIG_RCU_EQS_DEBUG=y
 # CONFIG_RUNTIME_TESTING_MENU is not set
 CONFIG_MEMTEST=y
 # CONFIG_SYSFS_SYSCALL is not set
+CONFIG_EFI=y