Skip to contentSkip to conversation

Make SCSI HBA configurable

PATCH In review Hannes Reinecke 5 participants 9 messages Nov 22, 2010 – Nov 26, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make SCSI HBA configurable

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

---
 Makefile.objs                        |    5 +++--
 default-configs/i386-softmmu.mak     |    2 ++
 default-configs/mips-softmmu.mak     |    2 +-
 default-configs/mips64-softmmu.mak   |    2 +-
 default-configs/mips64el-softmmu.mak |    2 +-
 default-configs/mipsel-softmmu.mak   |    2 +-
 default-configs/ppc-softmmu.mak      |    2 ++
 default-configs/ppc64-softmmu.mak    |    2 ++
 default-configs/ppcemb-softmmu.mak   |    2 ++
 default-configs/sparc-softmmu.mak    |    2 +-
 default-configs/sparc64-softmmu.mak  |    2 ++
 default-configs/x86_64-softmmu.mak   |    2 ++
 12 files changed, 20 insertions(+), 7 deletions(-)
Makefile.objs +3 -2
index 89c8661..3b040cd 100644
@@ -231,8 +231,9 @@ hw-obj-$(CONFIG_IDE_MACIO) += ide/macio.o
 hw-obj-$(CONFIG_IDE_VIA) += ide/via.o
 
 # SCSI layer
-hw-obj-y += lsi53c895a.o megasas.o
-hw-obj-$(CONFIG_ESP) += esp.o
+hw-obj-$(CONFIG_SCSI_LSI) += lsi53c895a.o
+hw-obj-$(CONFIG_SCSI_MEGASAS) += megasas.o
+hw-obj-$(CONFIG_SCSI_ESP) += esp.o
 
 hw-obj-y += dma-helpers.o sysbus.o isa-bus.o
 hw-obj-y += qdev-addr.o
default-configs/i386-softmmu.mak +2 -0
index ed00471..130c157 100644
@@ -19,6 +19,8 @@ CONFIG_IDE_QDEV=y
 CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_PIIX=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_NE2000_ISA=y
 CONFIG_PIIX_PCI=y
 CONFIG_SOUND=y
default-configs/mips-softmmu.mak +1 -1
index 3d0af83..7e840a4 100644
@@ -1,7 +1,7 @@
 # Default configuration for mips-softmmu
 
 CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
 CONFIG_VGA_PCI=y
 CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
default-configs/mips64-softmmu.mak +1 -1
index 0030de4..3816be3 100644
@@ -1,7 +1,7 @@
 # Default configuration for mips64-softmmu
 
 CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
 CONFIG_VGA_PCI=y
 CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
default-configs/mips64el-softmmu.mak +1 -1
index fa2a3ff..21c59e0 100644
@@ -1,7 +1,7 @@
 # Default configuration for mips64el-softmmu
 
 CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
 CONFIG_VGA_PCI=y
 CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
default-configs/mipsel-softmmu.mak +1 -1
index 238b73a..3cf853a 100644
@@ -1,7 +1,7 @@
 # Default configuration for mipsel-softmmu
 
 CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
 CONFIG_VGA_PCI=y
 CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
default-configs/ppc-softmmu.mak +2 -0
index 940f4bf..0cc5914 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_CMD646=y
 CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
default-configs/ppc64-softmmu.mak +2 -0
index e1bc6b8..ce83254 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_CMD646=y
 CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
default-configs/ppcemb-softmmu.mak +2 -0
index 8f1cc09..44111c3 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_CMD646=y
 CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_NE2000_ISA=y
 CONFIG_SOUND=y
 CONFIG_VIRTIO_PCI=y
default-configs/sparc-softmmu.mak +1 -1
index becf880..872929d 100644
@@ -1,7 +1,7 @@
 # Default configuration for sparc-softmmu
 
 CONFIG_ECC=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
 CONFIG_ESCC=y
 CONFIG_M48T59=y
 CONFIG_PTIMER=y
default-configs/sparc64-softmmu.mak +2 -0
index 1cc3f13..b4a3c27 100644
@@ -13,4 +13,6 @@ CONFIG_IDE_QDEV=y
 CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_CMD646=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_VIRTIO_PCI=y
default-configs/x86_64-softmmu.mak +2 -0
index 5183203..f28b66d 100644
@@ -19,6 +19,8 @@ CONFIG_IDE_QDEV=y
 CONFIG_IDE_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_PIIX=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
 CONFIG_NE2000_ISA=y
 CONFIG_PIIX_PCI=y
 CONFIG_SOUND=y
Signature · 1 line
1.6.0.2
Acked-by on v1 1/1
#1 lore raw
Quoted 173 lines · Hannes Reinecke

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

---
  Makefile.objs                        |    5 +++--
  default-configs/i386-softmmu.mak     |    2 ++
  default-configs/mips-softmmu.mak     |    2 +-
  default-configs/mips64-softmmu.mak   |    2 +-
  default-configs/mips64el-softmmu.mak |    2 +-
  default-configs/mipsel-softmmu.mak   |    2 +-
  default-configs/ppc-softmmu.mak      |    2 ++
  default-configs/ppc64-softmmu.mak    |    2 ++
  default-configs/ppcemb-softmmu.mak   |    2 ++
  default-configs/sparc-softmmu.mak    |    2 +-
  default-configs/sparc64-softmmu.mak  |    2 ++
  default-configs/x86_64-softmmu.mak   |    2 ++
  12 files changed, 20 insertions(+), 7 deletions(-)
Makefile.objs +3 -2
index 89c8661..3b040cd 100644
@@ -231,8 +231,9 @@ hw-obj-$(CONFIG_IDE_MACIO) += ide/macio.o
  hw-obj-$(CONFIG_IDE_VIA) += ide/via.o
 
  # SCSI layer
-hw-obj-y += lsi53c895a.o megasas.o
-hw-obj-$(CONFIG_ESP) += esp.o
+hw-obj-$(CONFIG_SCSI_LSI) += lsi53c895a.o
+hw-obj-$(CONFIG_SCSI_MEGASAS) += megasas.o
+hw-obj-$(CONFIG_SCSI_ESP) += esp.o
 
  hw-obj-y += dma-helpers.o sysbus.o isa-bus.o
  hw-obj-y += qdev-addr.o
default-configs/i386-softmmu.mak +2 -0
index ed00471..130c157 100644
@@ -19,6 +19,8 @@ CONFIG_IDE_QDEV=y
  CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_PIIX=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_NE2000_ISA=y
  CONFIG_PIIX_PCI=y
  CONFIG_SOUND=y
default-configs/mips-softmmu.mak +1 -1
index 3d0af83..7e840a4 100644
@@ -1,7 +1,7 @@
  # Default configuration for mips-softmmu
 
  CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
  CONFIG_VGA_PCI=y
  CONFIG_VGA_ISA=y
  CONFIG_VGA_ISA_MM=y
default-configs/mips64-softmmu.mak +1 -1
index 0030de4..3816be3 100644
@@ -1,7 +1,7 @@
  # Default configuration for mips64-softmmu
 
  CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
  CONFIG_VGA_PCI=y
  CONFIG_VGA_ISA=y
  CONFIG_VGA_ISA_MM=y
default-configs/mips64el-softmmu.mak +1 -1
index fa2a3ff..21c59e0 100644
@@ -1,7 +1,7 @@
  # Default configuration for mips64el-softmmu
 
  CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
  CONFIG_VGA_PCI=y
  CONFIG_VGA_ISA=y
  CONFIG_VGA_ISA_MM=y
default-configs/mipsel-softmmu.mak +1 -1
index 238b73a..3cf853a 100644
@@ -1,7 +1,7 @@
  # Default configuration for mipsel-softmmu
 
  CONFIG_ISA_MMIO=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
  CONFIG_VGA_PCI=y
  CONFIG_VGA_ISA=y
  CONFIG_VGA_ISA_MM=y
default-configs/ppc-softmmu.mak +2 -0
index 940f4bf..0cc5914 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_CMD646=y
  CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_NE2000_ISA=y
  CONFIG_SOUND=y
  CONFIG_VIRTIO_PCI=y
default-configs/ppc64-softmmu.mak +2 -0
index e1bc6b8..ce83254 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_CMD646=y
  CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_NE2000_ISA=y
  CONFIG_SOUND=y
  CONFIG_VIRTIO_PCI=y
default-configs/ppcemb-softmmu.mak +2 -0
index 8f1cc09..44111c3 100644
@@ -29,6 +29,8 @@ CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_CMD646=y
  CONFIG_IDE_MACIO=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_NE2000_ISA=y
  CONFIG_SOUND=y
  CONFIG_VIRTIO_PCI=y
default-configs/sparc-softmmu.mak +1 -1
index becf880..872929d 100644
@@ -1,7 +1,7 @@
  # Default configuration for sparc-softmmu
 
  CONFIG_ECC=y
-CONFIG_ESP=y
+CONFIG_SCSI_ESP=y
  CONFIG_ESCC=y
  CONFIG_M48T59=y
  CONFIG_PTIMER=y
default-configs/sparc64-softmmu.mak +2 -0
index 1cc3f13..b4a3c27 100644
@@ -13,4 +13,6 @@ CONFIG_IDE_QDEV=y
  CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_CMD646=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_VIRTIO_PCI=y
default-configs/x86_64-softmmu.mak +0 -0
index 5183203..f28b66d 100644

default-configs/x86_64-softmmu.mak CONFIG_IDE_QDEV=y · line 26

Quoted 8 lines
default-configs/x86_64-softmmu.mak +2 -0
@@ -19,6 +19,8 @@ CONFIG_IDE_QDEV=y
  CONFIG_IDE_PCI=y
  CONFIG_IDE_ISA=y
  CONFIG_IDE_PIIX=y
+CONFIG_SCSI_LSI=y
+CONFIG_SCSI_MEGASAS=y
  CONFIG_NE2000_ISA=y
  CONFIG_PIIX_PCI=y
  CONFIG_SOUND=y

Paolo

Acked-by on v1 1/1
#2 lore raw
In reply to Hannes Reinecke
Quoted 9 lines · Hannes Reinecke

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

Quoted 14 lines
---
 Makefile.objs                        |    5 +++--
 default-configs/i386-softmmu.mak     |    2 ++
 default-configs/mips-softmmu.mak     |    2 +-
 default-configs/mips64-softmmu.mak   |    2 +-
 default-configs/mips64el-softmmu.mak |    2 +-
 default-configs/mipsel-softmmu.mak   |    2 +-
 default-configs/ppc-softmmu.mak      |    2 ++
 default-configs/ppc64-softmmu.mak    |    2 ++
 default-configs/ppcemb-softmmu.mak   |    2 ++
 default-configs/sparc-softmmu.mak    |    2 +-
 default-configs/sparc64-softmmu.mak  |    2 ++
 default-configs/x86_64-softmmu.mak   |    2 ++
 12 files changed, 20 insertions(+), 7 deletions(-)

With a configure flag to flip modify the list from the default it would reach perfect status :)

Cheers,
Jes

#3 lore raw
Quoted 25 lines · Jes Sorensen
Quoted 10 lines · Hannes Reinecke

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

---

Quoted 13 lines
Makefile.objs                        |    5 +++--
default-configs/i386-softmmu.mak     |    2 ++
default-configs/mips-softmmu.mak     |    2 +-
default-configs/mips64-softmmu.mak   |    2 +-
default-configs/mips64el-softmmu.mak |    2 +-
default-configs/mipsel-softmmu.mak   |    2 +-
default-configs/ppc-softmmu.mak      |    2 ++
default-configs/ppc64-softmmu.mak    |    2 ++
default-configs/ppcemb-softmmu.mak   |    2 ++
default-configs/sparc-softmmu.mak    |    2 +-
default-configs/sparc64-softmmu.mak  |    2 ++
default-configs/x86_64-softmmu.mak   |    2 ++
12 files changed, 20 insertions(+), 7 deletions(-)
Quoted 4 lines

With a configure flag to flip modify the list from the default it would reach perfect status :)

We don't have that for any device yet that's represented in the default-configs. I'd actually rather advocate to go with a make menuconfig + Kconfig style format here instead of configure options.

Alex

#4 lore raw
In reply to Hannes Reinecke
Quoted 6 lines

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

No. These are both PCI devices, I see no particularly good reason to make them optional. At minimum they should be enabled by default on all configs.

The ESP controller is different because it is't a general purpose device, and only makes sense on certain systems.

Paul

#5 lore raw
Quoted 7 lines · Paul Brook
Quoted 6 lines

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

Quoted 5 lines

No. These are both PCI devices, I see no particularly good reason to make them optional. At minimum they should be enabled by default on all configs.

The ESP controller is different because it is't a general purpose device, and only makes sense on certain systems.

RH needs to compile out as much as they can from the code base, because they state that they support everything that's compiled in. So making as much as possible optional is good. And I don't see why we should limit ourselves here.

Alex

#6 lore raw
Quoted 12 lines · Paul Brook
Quoted 11 lines
Quoted 6 lines

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

No. These are both PCI devices, I see no particularly good reason to make them optional. At minimum they should be enabled by default on all configs.

Quoted 7 lines
Quoted 2 lines

The ESP controller is different because it is't a general purpose device, and only makes sense on certain systems.

RH needs to compile out as much as they can from the code base, because they state that they support everything that's compiled in. So making as much as possible optional is good. And I don't see why we should limit ourselves here.

My second point (should be enabled by default) still applies. Your patch removes the lsi controller from the default arm-softmmu config, which is definitely wrong.

Paul

#7 lore raw
Quoted 15 lines · Paul Brook
Quoted 15 lines · Paul Brook
Quoted 13 lines
Quoted 6 lines

This patch introduces configuration variables CONFIG_SCSI_LSI
CONFIG_SCSI_MEGASAS
and renames the existing CONFIG_ESP to CONFIG_SCSI_ESP. With this the available SCSI HBAs can be configured for each target configuration instead of compiling it in for everyone.

No. These are both PCI devices, I see no particularly good reason to make them optional. At minimum they should be enabled by default on all configs.

The ESP controller is different because it is't a general purpose device, and only makes sense on certain systems.

Quoted 8 lines
Quoted 4 lines

RH needs to compile out as much as they can from the code base, because they state that they support everything that's compiled in. So making as much as possible optional is good. And I don't see why we should limit ourselves here.

My second point (should be enabled by default) still applies. Your patch removes the lsi controller from the default arm-softmmu config, which is definitely wrong.

My patches don't even touch the LSI controller. I guess you meant Hannes. But I agree. Enablement-wise nothing should change before and after the patch.

Alex

#8 lore raw
In reply to Paul Brook
Quoted 9 lines · Paul Brook
Quoted 5 lines · Paul Brook

RH needs to compile out as much as they can from the code base, because they state that they support everything that's compiled in. So making as much as possible optional is good. And I don't see why we should limit ourselves here.

My second point (should be enabled by default) still applies. Your patch removes the lsi controller from the default arm-softmmu config, which is definitely wrong.

Right I am not advocating changing the defaults, all I suggest is we make it an option to disable some of the devices. There are people running on smaller systems or dedicated systems where they know exactly which 7 devices they need and nothing more. They would be quite happy to be able to strip down QEMU to the minimum they need.

Cheers,
Jes