[Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha

Yang Zhong posted 44 patches 5 years, 5 months ago
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Palmer Dabbelt <palmer@sifive.com>, Marek Vasut <marex@denx.de>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Jason Wang <jasowang@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Christian Borntraeger <borntraeger@de.ibm.com>, Corey Minyard <minyard@acm.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Michael Clark <mjc@sifive.com>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Greg Kurz <groug@kaod.org>, Cornelia Huck <cohuck@redhat.com>, Michael Walle <michael@walle.cc>, Igor Mammedov <imammedo@redhat.com>, Max Reitz <mreitz@redhat.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Peter Maydell <peter.maydell@linaro.org>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <Alistair.Francis@wdc.com>, Stafford Horne <shorne@gmail.com>, Cleber Rosa <crosa@redhat.com>, Chris Wulff <crwulff@gmail.com>, Alberto Garcia <berto@igalia.com>, Fam Zheng <fam@euphon.net>, Aleksandar Markovic <amarkovic@wavecomp.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Kevin Wolf <kwolf@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Anthony Green <green@moxielogic.com>, Halil Pasic <pasic@linux.ibm.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Stefan Markovic <smarkovic@wavecomp.com>, Stefan Berger <stefanb@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Alistair Francis <alistair@alistair23.me>, Artyom Tarasenko <atar4qemu@gmail.com>, John Snow <jsnow@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
There is a newer version of this series
[Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Posted by Yang Zhong 5 years, 5 months ago
Add the new configs to default-configs/alpha-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 default-configs/alpha-softmmu.mak | 2 ++
 hw/alpha/Makefile.objs            | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index 4d654eaa0b..c570caccd1 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -19,3 +19,5 @@ CONFIG_I8259=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_SMC37C669=y
+CONFIG_DP264=y
+CONFIG_TYPHOON=y
diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
index 5c742756f0..61579207ee 100644
--- a/hw/alpha/Makefile.objs
+++ b/hw/alpha/Makefile.objs
@@ -1 +1,3 @@
-obj-y += dp264.o pci.o typhoon.o
+obj-y += pci.o
+obj-$(CONFIG_DP264) += dp264.o
+obj-$(CONFIG_TYPHOON) += typhoon.o
-- 
2.17.1


Re: [Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Posted by Thomas Huth 5 years, 5 months ago
On 2019-01-23 07:55, Yang Zhong wrote:
> Add the new configs to default-configs/alpha-sofmmu.mak.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
>  default-configs/alpha-softmmu.mak | 2 ++
>  hw/alpha/Makefile.objs            | 4 +++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
> index 4d654eaa0b..c570caccd1 100644
> --- a/default-configs/alpha-softmmu.mak
> +++ b/default-configs/alpha-softmmu.mak
> @@ -19,3 +19,5 @@ CONFIG_I8259=y
>  CONFIG_MC146818RTC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_SMC37C669=y
> +CONFIG_DP264=y
> +CONFIG_TYPHOON=y
> diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
> index 5c742756f0..61579207ee 100644
> --- a/hw/alpha/Makefile.objs
> +++ b/hw/alpha/Makefile.objs
> @@ -1 +1,3 @@
> -obj-y += dp264.o pci.o typhoon.o
> +obj-y += pci.o
> +obj-$(CONFIG_DP264) += dp264.o
> +obj-$(CONFIG_TYPHOON) += typhoon.o

Reviewed-by: Thomas Huth <thuth@redhat.com>

Re: [Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Posted by Richard Henderson 5 years, 5 months ago
On 1/22/19 10:55 PM, Yang Zhong wrote:
> @@ -19,3 +19,5 @@ CONFIG_I8259=y
>  CONFIG_MC146818RTC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_SMC37C669=y
> +CONFIG_DP264=y
> +CONFIG_TYPHOON=y

There's not really a point in two configs; just use DP264.

But beyond that, is there a point in adding configury that must be set to Y?
There is exactly one machine type implemented for Alpha.  I don't see anyone
implementing a different machine type in the future either.


r~

Re: [Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Posted by Thomas Huth 5 years, 5 months ago
On 2019-01-23 22:11, Richard Henderson wrote:
> On 1/22/19 10:55 PM, Yang Zhong wrote:
>> @@ -19,3 +19,5 @@ CONFIG_I8259=y
>>  CONFIG_MC146818RTC=y
>>  CONFIG_ISA_TESTDEV=y
>>  CONFIG_SMC37C669=y
>> +CONFIG_DP264=y
>> +CONFIG_TYPHOON=y
> 
> There's not really a point in two configs; just use DP264.

Ah, right, typhoon belongs to the clipper/dp264 machine, so that should
be fine to use only one config here.

> But beyond that, is there a point in adding configury that must be set to Y?
> There is exactly one machine type implemented for Alpha.  I don't see anyone
> implementing a different machine type in the future either.

I see two reasons:

1) Someone might want to build QEMU as plain instruction set simulator
with just the "none" machine included. Then you need the CONFIG_DP264
switch to disable the main machine. Ok, that's not very likely, but
still a possibility.

2) Since this series is about adding a Kconfig-style system to QEMU,
there might be other CONFIG switches that depend on this one later, e.g.
for the x86 machines, a later patch adds:

 config ACPI_NVDIMM
     bool
     default y
     depends on PC || Q35

Agreed, we do not have any "depends on DP264" in this series yet, but I
think it's cleaner if we add a proper config switch for each machine
right from the start.

 Thomas

Re: [Qemu-devel] [RFC PATCH v4 16/44] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Posted by Paolo Bonzini 5 years, 5 months ago
On 24/01/19 10:09, Thomas Huth wrote:
> 2) Since this series is about adding a Kconfig-style system to QEMU,
> there might be other CONFIG switches that depend on this one later, e.g.
> for the x86 machines, a later patch adds:
> 
>  config ACPI_NVDIMM
>      bool
>      default y
>      depends on PC || Q35

Indeed, this is the main reason; it's cleaner.  For example, the
s390-specific VFIO backends depend on "LINUX && S390_VIRTIO_CCW".

Paolo

> Agreed, we do not have any "depends on DP264" in this series yet, but I
> think it's cleaner if we add a proper config switch for each machine
> right from the start.