Re: [PATCH] RISC-V: Only select essential drivers for SOC_VIRT config
From: Anup Patel
Date: Thu Mar 19 2020 - 00:30:25 EST
Hi Palmer,
On Tue, Mar 10, 2020 at 5:46 PM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
>
> On Tue, Mar 10, 2020 at 05:29:25PM +0530, Anup Patel wrote:
> > The kconfig select causes build failues for SOC_VIRT config becaus
> > we are selecting lot of VIRTIO drivers without selecting all required
> > dependencies.
> >
> > Better approach is to only select essential drivers from SOC_VIRT
> > config option and enable required VIRTIO drivers using defconfigs.
> >
> > Fixes: 759bdc168181 ("RISC-V: Add kconfig option for QEMU virt machine")
> > Signed-off-by: Anup Patel <anup.patel@xxxxxxx>
>
> Yea makes sense.
>
> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
Can you take this fix for Linux-5.6-rc7 ?
Regards,
Anup
>
> > ---
> > arch/riscv/Kconfig.socs | 14 --------------
> > arch/riscv/configs/defconfig | 16 +++++++++++++++-
> > arch/riscv/configs/rv32_defconfig | 16 +++++++++++++++-
> > 3 files changed, 30 insertions(+), 16 deletions(-)
> >
> > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> > index 3078b2de0b2d..a131174a0a77 100644
> > --- a/arch/riscv/Kconfig.socs
> > +++ b/arch/riscv/Kconfig.socs
> > @@ -12,20 +12,6 @@ config SOC_SIFIVE
> >
> > config SOC_VIRT
> > bool "QEMU Virt Machine"
> > - select VIRTIO_PCI
> > - select VIRTIO_BALLOON
> > - select VIRTIO_MMIO
> > - select VIRTIO_CONSOLE
> > - select VIRTIO_NET
> > - select NET_9P_VIRTIO
> > - select VIRTIO_BLK
> > - select SCSI_VIRTIO
> > - select DRM_VIRTIO_GPU
> > - select HW_RANDOM_VIRTIO
> > - select RPMSG_CHAR
> > - select RPMSG_VIRTIO
> > - select CRYPTO_DEV_VIRTIO
> > - select VIRTIO_INPUT
> > select POWER_RESET_SYSCON
> > select POWER_RESET_SYSCON_POWEROFF
> > select GOLDFISH
> > diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> > index c8f084203067..2557c5372a25 100644
> > --- a/arch/riscv/configs/defconfig
> > +++ b/arch/riscv/configs/defconfig
> > @@ -31,6 +31,7 @@ CONFIG_IP_PNP_BOOTP=y
> > CONFIG_IP_PNP_RARP=y
> > CONFIG_NETLINK_DIAG=y
> > CONFIG_NET_9P=y
> > +CONFIG_NET_9P_VIRTIO=y
> > CONFIG_PCI=y
> > CONFIG_PCIEPORTBUS=y
> > CONFIG_PCI_HOST_GENERIC=y
> > @@ -38,12 +39,15 @@ CONFIG_PCIE_XILINX=y
> > CONFIG_DEVTMPFS=y
> > CONFIG_DEVTMPFS_MOUNT=y
> > CONFIG_BLK_DEV_LOOP=y
> > +CONFIG_VIRTIO_BLK=y
> > CONFIG_BLK_DEV_SD=y
> > CONFIG_BLK_DEV_SR=y
> > +CONFIG_SCSI_VIRTIO=y
> > CONFIG_ATA=y
> > CONFIG_SATA_AHCI=y
> > CONFIG_SATA_AHCI_PLATFORM=y
> > CONFIG_NETDEVICES=y
> > +CONFIG_VIRTIO_NET=y
> > CONFIG_MACB=y
> > CONFIG_E1000E=y
> > CONFIG_R8169=y
> > @@ -54,13 +58,16 @@ CONFIG_SERIAL_8250_CONSOLE=y
> > CONFIG_SERIAL_OF_PLATFORM=y
> > CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
> > CONFIG_HVC_RISCV_SBI=y
> > +CONFIG_VIRTIO_CONSOLE=y
> > CONFIG_HW_RANDOM=y
> > +CONFIG_HW_RANDOM_VIRTIO=y
> > CONFIG_SPI=y
> > CONFIG_SPI_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_FRAMEBUFFER_CONSOLE=y
> > CONFIG_USB=y
> > CONFIG_USB_XHCI_HCD=y
> > @@ -74,6 +81,12 @@ CONFIG_USB_UAS=y
> > CONFIG_MMC=y
> > CONFIG_MMC_SPI=y
> > CONFIG_RTC_CLASS=y
> > +CONFIG_VIRTIO_PCI=y
> > +CONFIG_VIRTIO_BALLOON=y
> > +CONFIG_VIRTIO_INPUT=y
> > +CONFIG_VIRTIO_MMIO=y
> > +CONFIG_RPMSG_CHAR=y
> > +CONFIG_RPMSG_VIRTIO=y
> > CONFIG_EXT4_FS=y
> > CONFIG_EXT4_FS_POSIX_ACL=y
> > CONFIG_AUTOFS4_FS=y
> > @@ -88,16 +101,17 @@ CONFIG_NFS_V4_2=y
> > CONFIG_ROOT_NFS=y
> > CONFIG_9P_FS=y
> > CONFIG_CRYPTO_USER_API_HASH=y
> > +CONFIG_CRYPTO_DEV_VIRTIO=y
> > CONFIG_PRINTK_TIME=y
> > CONFIG_DEBUG_FS=y
> > CONFIG_DEBUG_PAGEALLOC=y
> > +CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_DEBUG_VM=y
> > CONFIG_DEBUG_VM_PGFLAGS=y
> > CONFIG_DEBUG_MEMORY_INIT=y
> > CONFIG_DEBUG_PER_CPU_MAPS=y
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > CONFIG_WQ_WATCHDOG=y
> > -CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_DEBUG_TIMEKEEPING=y
> > CONFIG_DEBUG_RT_MUTEXES=y
> > CONFIG_DEBUG_SPINLOCK=y
> > diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
> > index a844920a261f..0292879a9690 100644
> > --- a/arch/riscv/configs/rv32_defconfig
> > +++ b/arch/riscv/configs/rv32_defconfig
> > @@ -31,6 +31,7 @@ CONFIG_IP_PNP_BOOTP=y
> > CONFIG_IP_PNP_RARP=y
> > CONFIG_NETLINK_DIAG=y
> > CONFIG_NET_9P=y
> > +CONFIG_NET_9P_VIRTIO=y
> > CONFIG_PCI=y
> > CONFIG_PCIEPORTBUS=y
> > CONFIG_PCI_HOST_GENERIC=y
> > @@ -38,12 +39,15 @@ CONFIG_PCIE_XILINX=y
> > CONFIG_DEVTMPFS=y
> > CONFIG_DEVTMPFS_MOUNT=y
> > CONFIG_BLK_DEV_LOOP=y
> > +CONFIG_VIRTIO_BLK=y
> > CONFIG_BLK_DEV_SD=y
> > CONFIG_BLK_DEV_SR=y
> > +CONFIG_SCSI_VIRTIO=y
> > CONFIG_ATA=y
> > CONFIG_SATA_AHCI=y
> > CONFIG_SATA_AHCI_PLATFORM=y
> > CONFIG_NETDEVICES=y
> > +CONFIG_VIRTIO_NET=y
> > CONFIG_MACB=y
> > CONFIG_E1000E=y
> > CONFIG_R8169=y
> > @@ -54,11 +58,14 @@ CONFIG_SERIAL_8250_CONSOLE=y
> > CONFIG_SERIAL_OF_PLATFORM=y
> > CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
> > CONFIG_HVC_RISCV_SBI=y
> > +CONFIG_VIRTIO_CONSOLE=y
> > CONFIG_HW_RANDOM=y
> > +CONFIG_HW_RANDOM_VIRTIO=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_FRAMEBUFFER_CONSOLE=y
> > CONFIG_USB=y
> > CONFIG_USB_XHCI_HCD=y
> > @@ -70,6 +77,12 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
> > CONFIG_USB_STORAGE=y
> > CONFIG_USB_UAS=y
> > CONFIG_RTC_CLASS=y
> > +CONFIG_VIRTIO_PCI=y
> > +CONFIG_VIRTIO_BALLOON=y
> > +CONFIG_VIRTIO_INPUT=y
> > +CONFIG_VIRTIO_MMIO=y
> > +CONFIG_RPMSG_CHAR=y
> > +CONFIG_RPMSG_VIRTIO=y
> > CONFIG_EXT4_FS=y
> > CONFIG_EXT4_FS_POSIX_ACL=y
> > CONFIG_AUTOFS4_FS=y
> > @@ -84,16 +97,17 @@ CONFIG_NFS_V4_2=y
> > CONFIG_ROOT_NFS=y
> > CONFIG_9P_FS=y
> > CONFIG_CRYPTO_USER_API_HASH=y
> > +CONFIG_CRYPTO_DEV_VIRTIO=y
> > CONFIG_PRINTK_TIME=y
> > CONFIG_DEBUG_FS=y
> > CONFIG_DEBUG_PAGEALLOC=y
> > +CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_DEBUG_VM=y
> > CONFIG_DEBUG_VM_PGFLAGS=y
> > CONFIG_DEBUG_MEMORY_INIT=y
> > CONFIG_DEBUG_PER_CPU_MAPS=y
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > CONFIG_WQ_WATCHDOG=y
> > -CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_DEBUG_TIMEKEEPING=y
> > CONFIG_DEBUG_RT_MUTEXES=y
> > CONFIG_DEBUG_SPINLOCK=y
> > --
> > 2.17.1
> >
> >
>