All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: "Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PULL 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge
Date: Sat, 2 Nov 2019 21:56:34 +0100	[thread overview]
Message-ID: <55be8d9e-eb95-4e87-6450-0bf12e590a66@redhat.com> (raw)
In-Reply-To: <78fb8474-5e89-b05e-315b-32b587ca4353@redhat.com>

On 11/2/19 9:28 PM, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> On 10/30/19 10:44 AM, Philippe Mathieu-Daudé wrote:
>> Hi Peter, Paolo,
>>
>> On 10/30/19 7:15 AM, Peter Maydell wrote:
>>> On Mon, 28 Oct 2019 at 17:48, Philippe Mathieu-Daudé 
>>> <philmd@redhat.com> wrote:
>>>>
>>>> ----------------------------------------------------------------
>>>> The i440FX northbridge is only used by the PC machine, while the
>>>> PIIX southbridge is also used by the Malta MIPS machine.
>>>>
>>>> Split the PIIX3 southbridge from i440FX northbridge.
>>>>
>>>> ----------------------------------------------------------------
>>>
>>> I get a link failure on my 'do a make clean and then make' build :
>>>    LINK    i386-softmmu/qemu-system-i386
>>> hw/i386/pc_piix.o: In function `pc_init1':
>>> /home/petmay01/linaro/qemu-for-merges/hw/i386/pc_piix.c:197: undefined
>>> reference to `i440fx_init'
>>> /home/petmay01/linaro/qemu-for-merges/hw/i386/pc_piix.c:206: undefined
>>> reference to `piix3_create'
>>> collect2: error: ld returned 1 exit status
>>
>> This is odd, default-configs/i386-softmmu.mak selects CONFIG_I440FX, 
>> I440FX selects PCI_I440FX, and the Makefile.objs has:
>> common-obj-$(CONFIG_PCI_I440FX) += i440fx.o
>>
>> The change is in patch "hw/pci-host: Rename incorrectly named 'piix' 
>> as 'i440fx'" which is a simple rename:
>>
>> -- >8 --
>> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
>> index d420b35548..5a494342ea 100644
>> --- a/hw/i386/Kconfig
>> +++ b/hw/i386/Kconfig
>> @@ -60,7 +60,7 @@ config I440FX
>>       select PC_PCI
>>       select PC_ACPI
>>       select ACPI_SMBUS
>> -    select PCI_PIIX
>> +    select PCI_I440FX
>>       select PIIX3
>>       select IDE_PIIX
>>       select DIMM
>> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
>> index 397043b289..b0aa8351c4 100644
>> --- a/hw/pci-host/Kconfig
>> +++ b/hw/pci-host/Kconfig
>> @@ -28,7 +28,7 @@ config PCI_SABRE
>>       select PCI
>>       bool
>>
>> -config PCI_PIIX
>> +config PCI_I440FX
>>       bool
>>       select PCI
>>       select PAM
>> diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs
>> index a9cd3e022d..efd752b766 100644
>> --- a/hw/pci-host/Makefile.objs
>> +++ b/hw/pci-host/Makefile.objs
>> @@ -13,7 +13,7 @@ common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o
>>
>>   common-obj-$(CONFIG_PCI_SABRE) += sabre.o
>>   common-obj-$(CONFIG_FULONG) += bonito.o
>> -common-obj-$(CONFIG_PCI_PIIX) += piix.o
>> +common-obj-$(CONFIG_PCI_I440FX) += i440fx.o
>>   common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o
>>   common-obj-$(CONFIG_PCI_EXPRESS_GENERIC_BRIDGE) += gpex.o
>>   common-obj-$(CONFIG_PCI_EXPRESS_XILINX) += xilinx-pcie.o
>> diff --git a/hw/pci-host/piix.c b/hw/pci-host/i440fx.c
>> similarity index 100%
>> rename from hw/pci-host/piix.c
>> rename to hw/pci-host/i440fx.c
>> ---
>>
>> I could reproduce and hw/pci-host/ doesn't contains neither piix.o nor 
>> i440fx.o.
>>
>> $ fgrep -ri i440fx i386-softmmu/
>> i386-softmmu/config-devices.h-timestamp:#define CONFIG_I440FX 1
>> i386-softmmu/config-devices.mak.old:CONFIG_I440FX=y
>> Binary file i386-softmmu/hw/i386/pc_piix.o matches
>> i386-softmmu/hw/i386/pc_piix.d: 
>> /home/phil/source/qemu/include/hw/pci-host/i440fx.h \
>> i386-softmmu/hw/i386/pc_piix.d:/home/phil/source/qemu/include/hw/pci-host/i440fx.h: 
>>
>> Binary file i386-softmmu/hw/i386/acpi-build.o matches
>> Binary file i386-softmmu/hw/i386/pc.o matches
>> i386-softmmu/config-devices.mak:CONFIG_I440FX=y
>> i386-softmmu/config-devices.h:#define CONFIG_I440FX 1
>>
>> So CONFIG_I440FX is here, but no CONFIG_PCI_I440FX...
>>
>> $ fgrep -r PIIX i386-softmmu/
>> i386-softmmu/config-devices.h-timestamp:#define CONFIG_IDE_PIIX 1
>> i386-softmmu/config-devices.h-timestamp:#define CONFIG_PCI_PIIX 1
>> i386-softmmu/config-devices.mak.old:CONFIG_IDE_PIIX=y
>> i386-softmmu/config-devices.mak.old:CONFIG_PCI_PIIX=y
>> Binary file i386-softmmu/hw/i386/pc_piix.o matches
>> Binary file i386-softmmu/hw/i386/acpi-build.o matches
>> Binary file i386-softmmu/hw/i386/pc.o matches
>> i386-softmmu/config-devices.mak:CONFIG_IDE_PIIX=y
>> i386-softmmu/config-devices.mak:CONFIG_PCI_PIIX=y
>> i386-softmmu/config-devices.h:#define CONFIG_IDE_PIIX 1
>> i386-softmmu/config-devices.h:#define CONFIG_PCI_PIIX 1
>>
>> And the old CONFIG_PCI_PIIX is still there :(
>>
>> Paolo, is some kconfig dependency missing?
> 
> docs/devel/build-system.txt is misleading:
> 
>    - $TARGET-NAME/config-devices.mak
> 
>    TARGET-NAME is again the name of a system or userspace emulator. The
>    config-devices.mak file is automatically generated by make using the
>    scripts/make_device_config.sh program, feeding it the
>    default-configs/$TARGET-NAME file as input.
> 
> But this script has been removed in e0e312f3525:
> 
>    build: switch to Kconfig
> 
>    The make_device_config.sh script is replaced by minikconf, which
>    is modified to support the same command line as its predecessor.
> 
> Anyway, back to my problem. We modified hw/i386/Kconfig and 
> hw/pci-host/Kconfig. i386-softmmu/config-devices.mak hasn't been rebuilt.
> 
> Here is the make rule matching i386-softmmu/config-devices.mak:
> 
> $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak 
> $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak
>      $(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, 
> "GEN", "$@.tmp")
> 
> With:
> 
> MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
> 
> So hw/{i386,pci-host}/Kconfig aren't matched and doesn't trigger the 
> regeneration of i386-softmmu/config-devices.mak.
> 
> I'm not sure how to properly fix this.

So this fixed it, suboptimal but easy:

-- >8 --
diff --git a/Makefile b/Makefile
index 0e994a275d..18414553f4 100644
--- a/Makefile
+++ b/Makefile
@@ -384,7 +384,10 @@ MINIKCONF_ARGS = \
      CONFIG_LINUX=$(CONFIG_LINUX) \
      CONFIG_PVRDMA=$(CONFIG_PVRDMA)

-MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
+MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \
+                   $(patsubst %,$(SRC_PATH)/hw/%,$(shell sed -ne \
+                                                      's/source 
\(.*\)/\1/p' \
+                                                      < 
$(SRC_PATH)/hw/Kconfig))
  MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \

  $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak 
$(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak

---

> Also, is the backslash useful at the end of this line in Makefile?
> 
> MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
> 
> 
> Regards,
> 
> Phil.


      reply	other threads:[~2019-11-02 20:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 16:34 [PULL 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 01/20] MAINTAINERS: Keep PIIX4 South Bridge separate from PC Chipsets Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 02/20] piix4: Add the Reset Control Register Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 03/20] piix4: Add an i8259 Interrupt Controller as specified in datasheet Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 04/20] Revert "irq: introduce qemu_irq_proxy()" Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 05/20] piix4: Rename PIIX4 object to piix4-isa Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 06/20] piix4: Add an i8257 DMA Controller as specified in datasheet Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 07/20] piix4: Add an i8254 PIT " Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 08/20] piix4: Add a MC146818 RTC " Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 09/20] hw/mips/mips_malta: Create IDE hard drive array dynamically Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 10/20] hw/mips/mips_malta: Extract the PIIX4 creation code as piix4_create() Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 11/20] hw/isa/piix4: Move piix4_create() to hw/isa/piix4.c Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 12/20] hw/i386: Remove obsolete LoadStateHandler::load_state_old handlers Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 13/20] hw/pci-host/piix: Extract piix3_create() Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 14/20] hw/pci-host/piix: Move RCR_IOPORT register definition Philippe Mathieu-Daudé
2019-10-28 16:34 ` [Xen-devel] [PULL 15/20] hw/pci-host/piix: Define and use the PIIX IRQ Route Control Registers Philippe Mathieu-Daudé
2019-10-28 16:34   ` Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 16/20] hw/pci-host/piix: Move i440FX declarations to hw/pci-host/i440fx.h Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 17/20] hw/pci-host/piix: Fix code style issues Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 18/20] hw/pci-host/piix: Extract PIIX3 functions to hw/isa/piix3.c Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 19/20] hw/pci-host: Rename incorrectly named 'piix' as 'i440fx' Philippe Mathieu-Daudé
2019-10-28 16:34 ` [PULL 20/20] hw/pci-host/i440fx: Remove the last PIIX3 traces Philippe Mathieu-Daudé
2019-10-28 22:44 ` [PULL 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge no-reply
2019-10-29  1:58 ` no-reply
2019-10-29  3:19 ` no-reply
2019-10-29  5:16 ` no-reply
2019-10-29  5:18 ` Aleksandar Markovic
2019-10-29 17:04   ` Philippe Mathieu-Daudé
2019-10-29 22:10     ` Aleksandar Markovic
2019-10-30  6:15 ` Peter Maydell
2019-10-30  9:44   ` Philippe Mathieu-Daudé
2019-11-02 20:28     ` Philippe Mathieu-Daudé
2019-11-02 20:56       ` Philippe Mathieu-Daudé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55be8d9e-eb95-4e87-6450-0bf12e590a66@redhat.com \
    --to=philmd@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=hpoussin@reactos.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.