Kconfig for Arm machines
[Qemu-arm] [PULL v2 02/28] hw/ide/ahci: Add a Kconfig switch for the AHCI-ICH9 device
In reply to Thomas HuthSome of our machines (like the ARM cubieboard) use CONFIG_AHCI for an AHCI sysbus device, but do not use CONFIG_PCI since they do not feature a PCI bus. With CONFIG_AHCI but without CONFIG_PCI, currently linking fails:
../hw/ide/ich.o: In function `pci_ich9_ahci_realize':
hw/ide/ich.c:124: undefined reference to pci_allocate_irq' hw/ide/ich.c:126: undefined reference to pci_register_bar' hw/ide/ich.c:128: undefined reference to pci_register_bar' hw/ide/ich.c:131: undefined reference to pci_add_capability' hw/ide/ich.c:147: undefined reference to msi_init' ../hw/ide/ich.o: In function pci_ich9_uninit':
hw/ide/ich.c:158: undefined reference to msi_uninit' ../hw/ide/ich.o:(.data.rel+0x50): undefined reference to vmstate_pci_device'
We must only compile ich.c if CONFIG_PCI is available, too, so introduce a new config switch for this device.
--- hw/i386/Kconfig | 2 +- hw/ide/Kconfig | 6 +++++- hw/ide/Makefile.objs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-)
hw/i386/Kconfig +1 -1
@@ -80,7 +80,7 @@ config Q35 select PC_ACPI select PCI_EXPRESS_Q35 select LPC_ICH9 - select AHCI + select AHCI_ICH9 select DIMM select SMBIOS select VMPORT
hw/ide/Kconfig +5 -1
@@ -43,10 +43,14 @@ config MICRODRIVE select IDE_QDEV config AHCI + bool + select IDE_QDEV + +config AHCI_ICH9 bool default y if PCI_DEVICES depends on PCI - select IDE_QDEV + select AHCI config IDE_SII3112 bool
hw/ide/Makefile.objs +1 -1
@@ -9,6 +9,6 @@ common-obj-$(CONFIG_IDE_MMIO) += mmio.o common-obj-$(CONFIG_IDE_VIA) += via.o common-obj-$(CONFIG_MICRODRIVE) += microdrive.o common-obj-$(CONFIG_AHCI) += ahci.o -common-obj-$(CONFIG_AHCI) += ich.o +common-obj-$(CONFIG_AHCI_ICH9) += ich.o common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
Signature · 1 line
2.21.0
Hi Peter,
the following changes since commit a6ae23831b05a11880b40f7d58e332c45a6b04f7:
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
for you to fetch changes up to 69f879e9fefab9aaf24893fe4ce23e07756d703c:
hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------Kconfig settings for the Arm machines
(v2: Fix the dependency of q35 to AHCI_ICH9 in the second patch)
----------------------------------------------------------------
Thomas Huth (28):
hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs hw/ide/ahci: Add a Kconfig switch for the AHCI-ICH9 device hw/arm: Express dependencies of the exynos machines with Kconfig hw/arm: Express dependencies of the highbank machines with Kconfig hw/arm: Express dependencies of integratorcp with Kconfig hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig hw/arm: Express dependencies of musicpal with Kconfig
hw/arm: Express dependencies of the OMAP machines with Kconfig hw/arm: Express dependencies of stellaris with Kconfig
hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig hw/arm: Express dependencies of the PXA2xx machines with Kconfig hw/arm: Express dependencies of xilinx-zynq with Kconfig
hw/arm: Express dependencies of collie with Kconfig
hw/arm: Express dependencies of the aspeed boards with Kconfig hw/arm: Express dependencies of the virt machine with Kconfig hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig hw/arm: Express dependencies of allwinner / cubieboard with Kconfig hw/arm: Express dependencies of the MPS2 boards with Kconfig hw/arm: Express dependencies of the raspi machines with Kconfig hw/arm: Express dependencies of canon-a1100 with Kconfig
hw/arm: Express dependencies of sabrelite with Kconfig
hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig hw/arm: Express dependencies of the remaining IMX boards with Kconfig hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig hw/arm: Express dependencies of the musca machines with Kconfig hw/arm: Remove hard-enablement of the remaining PCI devices
default-configs/aarch64-softmmu.mak | 5 - default-configs/arm-softmmu.mak | 179 ++++---------------- hw/arm/Kconfig | 317 +++++++++++++++++++++++++++++++++++- hw/arm/Makefile.objs | 25 ++- hw/display/Kconfig | 3 + hw/i2c/Kconfig | 2 +- hw/i386/Kconfig | 2 +- hw/ide/Kconfig | 6 +- hw/ide/Makefile.objs | 2 +- hw/misc/Kconfig | 2 + hw/pci/pci-stub.c | 11 ++ 11 files changed, 384 insertions(+), 170 deletions(-)
Quoted 11 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
Quoted 8 lines
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Hi -- this is still failing in the build test where I 'make clean' before doing the build:
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386 QTEST_QEMU_IMG=qemu-img tests/a
hci-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="ahci-test"
qemu-system-i386: Unknown device 'ich9-ahci' for bus 'PCIE' Broken pipe
thanks
-- PMM
Quoted 14 lines · Peter Maydell
Quoted 13 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:
Quoted 8 lines
Quoted 6 lines
hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Thomas
Quoted 22 lines · Thomas Huth
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
It worked for me after running 'git fetch --tags', maybe because Thomas used the same tag?
[clicked ctrl+enter too fast]
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 22 lines · Thomas Huth
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
It worked for me after running 'git fetch --tags', maybe because Thomas used the same tag?
Maybe because Thomas used the same tag you are still trying the previous version?
Quoted 28 lines · Philippe Mathieu-Daudé
[clicked ctrl+enter too fast]
Quoted 25 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Thomas Huth
Quoted 22 lines · Peter Maydell
Quoted 11 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
Quoted 8 lines
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------Hi -- this is still failing in the build test where I 'make clean'
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
It worked for me after running 'git fetch --tags', maybe because Thomas used the same tag?
Maybe because Thomas used the same tag you are still trying the previous version?
I did not use the same tag. v1 had pull-request-2019-05-05 while v2 has pull-request-2019-05-07. So this can not be the reason.
Thomas
Quoted 32 lines · Thomas Huth
Quoted 31 lines · Philippe Mathieu-Daudé
[clicked ctrl+enter too fast]
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Thomas Huth
Quoted 14 lines · Peter Maydell
Quoted 13 lines · Thomas Huth
Hi Peter,
the following changes since commit
a6ae23831b05a11880b40f7d58e332c45a6b04f7:Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2019-05-03 15:26:09 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-05-07
for you to fetch changes up to
69f879e9fefab9aaf24893fe4ce23e07756d703c:Quoted 8 lines
Quoted 6 lines
hw/arm: Remove hard-enablement of the remaining PCI devices (2019-05-07 15:01:47 +0200)
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It worked for me after running 'git fetch --tags', maybe because Thomas used the same tag?
Maybe because Thomas used the same tag you are still trying the previous version?
I did not use the same tag. v1 had pull-request-2019-05-05 while v2 has pull-request-2019-05-07. So this can not be the reason.
Oh, I might have mixed up because I ran "git fetch" -> no change, because tags are not fetched by default. "pull-request-2019-05-07" is what I tested, with/without running "make clean". I can not reproduce the error Peter is having.
Quoted 8 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Nothing runs before make clean -- my scripts effectively just do a git merge, then make clean, then make, then make check.
http://people.linaro.org/~peter.maydell/config-devices.mak
is the i386-softmmu/config-devices.mak
(it does not include AHCI_ICH9).
I notice that "make clean" does not delete config-devices.mak, and "make" doesn't cause anything to update it, either.
Further, if I "touch hw/i386/Kconfig" and then run make, nothing is rebuilt at all, so something seems to be wrong with our makefile dependencies somewhere.
It's kind of weird that it only shows up with the from-clean build and not with the incrementals, though.
thanks
-- PMM
Cc'ing Paolo
Quoted 21 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Nothing runs before make clean -- my scripts effectively just do a git merge, then make clean, then make, then make check.
http://people.linaro.org/~peter.maydell/config-devices.mak
is the i386-softmmu/config-devices.mak
(it does not includeAHCI_ICH9).
Quoted 6 lines
I notice that "make clean" does not delete config-devices.mak, and "make" doesn't cause anything to update it, either.
Further, if I "touch hw/i386/Kconfig" and then run make, nothing is rebuilt at all, so something seems to be wrong with our makefile dependencies somewhere.
Good finding.
Quoted 7 lines
It's kind of weird that it only shows up with the from-clean build and not with the incrementals, though.
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Nothing runs before make clean -- my scripts effectively just do a git merge, then make clean, then make, then make check.
I tried to reproduce it for a while, but for me, switching between master and the kconfig-for-arm tree always triggers a "configure" run and thus the dependencies get regenerated right...
Quoted 2 lines
I notice that "make clean" does not delete config-devices.mak, and "make" doesn't cause anything to update it, either.
They are only removed during "distclean", but not for "clean" (which is what we want, IMHO).
Quoted 3 lines
Further, if I "touch hw/i386/Kconfig" and then run make, nothing is rebuilt at all, so something seems to be wrong with our makefile dependencies somewhere.
Now that's a good hint. There is definitely something wrong with the dependencies here. I can see that I've got a file called "x86_64-softmmu-config.devices.mak.d" in my build directory, but apparently the Makefile tries to include x86_64-softmmu/config-devices.mak.d via the SUBDIR_DEVICES_MAK_DEP variable instead. Since that file does not exist, the dependencies are completely ignored... Paolo, what was the intention here? Should the dependencies always be generated in the *softmmu folders instead?
Thomas
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth
----------------------------------------------------------------
Kconfigsettings for the Arm machines
(v2: Fix the dependency of q35 toAHCI_ICH9in the second patch)
----------------------------------------------------------------
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Hi -- this is still failing in the build test where I 'make clean'
Very weird. What is running before the "make clean"? Could you provide me with the content of i386-softmmu/config-devices.mak please?
Nothing runs before make clean -- my scripts effectively just do a git merge, then make clean, then make, then make check.
By the way, I think you should do "make clean" first, before the merge, in case something changed in the "clean" rules.
Quoted 3 lines
Further, if I "touch hw/i386/Kconfig" and then run make, nothing is rebuilt at all, so something seems to be wrong with our makefile dependencies somewhere.
I've sent a patch now, please have a look at "Makefile: Fix inclusion of the config-devices.mak.d Kconfig dependencies".
Thomas
Quoted 6 lines · Thomas Huth
Quoted 3 lines · Peter Maydell
Further, if I "touch hw/i386/Kconfig" and then run make, nothing is rebuilt at all, so something seems to be wrong with our makefile dependencies somewhere.
Quoted 8 lines
Now that's a good hint. There is definitely something wrong with the dependencies here. I can see that I've got a file called "x86_64-softmmu-config.devices.mak.d" in my build directory, but apparently the
Makefiletries to include x86_64-softmmu/config-devices.mak.d via theSUBDIR_DEVICES_MAK_DEPvariable instead. Since that file does not exist, the dependencies are completely ignored... Paolo, what was the intention here? Should the dependencies always be generated in the *softmmu folders instead?
I think the .mak.d files should live in the foo-softmmu/ subdirectories, because that puts them next to the .mak files that they're the dependencies for (it also avoids the slightly aesthetically unpleasing very long filenames in the root of the build directory).
thanks
-- PMM