[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 103/150] meson: convert hw/pci
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 103/150] meson: convert hw/pci |
Date: |
Tue, 18 Aug 2020 12:36:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 8/17/20 4:40 PM, Paolo Bonzini wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/Makefile.objs | 1 -
> hw/meson.build | 1 +
> hw/pci/Makefile.objs | 14 --------------
> hw/pci/meson.build | 19 +++++++++++++++++++
> 4 files changed, 20 insertions(+), 15 deletions(-)
> delete mode 100644 hw/pci/Makefile.objs
> create mode 100644 hw/pci/meson.build
>
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index 3513040d4a..20832841d2 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -21,7 +21,6 @@ devices-dirs-y += misc/
> devices-dirs-y += net/
> devices-dirs-y += rdma/
> devices-dirs-y += nvram/
> -devices-dirs-y += pci/
> endif
>
> common-obj-y += $(devices-dirs-y)
> diff --git a/hw/meson.build b/hw/meson.build
> index a7301f21e8..53c347c395 100644
> --- a/hw/meson.build
> +++ b/hw/meson.build
> @@ -1,6 +1,7 @@
> subdir('core')
> subdir('mem')
> subdir('nubus')
> +subdir('pci')
> subdir('pci-bridge')
> subdir('pci-host')
> subdir('pcmcia')
> diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
> deleted file mode 100644
> index c78f2fb24b..0000000000
> --- a/hw/pci/Makefile.objs
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
> -common-obj-$(CONFIG_PCI) += msix.o msi.o
> -common-obj-$(CONFIG_PCI) += shpc.o
> -common-obj-$(CONFIG_PCI) += slotid_cap.o
> -common-obj-$(CONFIG_PCI) += pci_host.o
> -
> -# The functions in these modules can be used by devices too. Since we
> -# allow plugging PCIe devices into PCI buses, include them even if
> -# CONFIG_PCI_EXPRESS=n.
> -common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o
> -common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
> -
> -common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
> -common-obj-$(CONFIG_ALL) += pci-stub.o
> diff --git a/hw/pci/meson.build b/hw/pci/meson.build
> new file mode 100644
> index 0000000000..5c4bbac817
> --- /dev/null
> +++ b/hw/pci/meson.build
> @@ -0,0 +1,19 @@
> +pci_ss = ss.source_set()
> +pci_ss.add(files(
> + 'msi.c',
> + 'msix.c',
> + 'pci.c',
> + 'pci_bridge.c',
> + 'pci_host.c',
> + 'shpc.c',
> + 'slotid_cap.c'
> +))
I'd have written this simply as:
softmmu_ss.add(when: 'CONFIG_PCI', if_true: files(
'msi.c',
'msix.c',
'pci.c',
'pci_bridge.c',
'pci_host.c',
'shpc.c',
'slotid_cap.c',
# The functions in these modules can be used by devices too. Since we
# allow plugging PCIe devices into PCI buses, include them even if
# CONFIG_PCI_EXPRESS=n.
'pcie.c',
'pcie_aer.c'
))
softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files(
'pcie_port.c',
'pcie_host.c'
))
And keep the pci-stub.c lines.
Anyway:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> +# The functions in these modules can be used by devices too. Since we
> +# allow plugging PCIe devices into PCI buses, include them even if
> +# CONFIG_PCI_EXPRESS=n.
> +pci_ss.add(files('pcie.c', 'pcie_aer.c'))
> +softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c',
> 'pcie_host.c'))
> +softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
> +
> +softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
> +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
>
- [PATCH 093/150] meson: convert hw/usb, (continued)
- [PATCH 093/150] meson: convert hw/usb, Paolo Bonzini, 2020/08/17
- [PATCH 095/150] meson: convert hw/timer, Paolo Bonzini, 2020/08/17
- [PATCH 096/150] meson: convert hw/rtc, Paolo Bonzini, 2020/08/17
- [PATCH 097/150] meson: convert hw/ssi, Paolo Bonzini, 2020/08/17
- [PATCH 098/150] meson: convert hw/sd, Paolo Bonzini, 2020/08/17
- [PATCH 099/150] meson: convert hw/scsi, Paolo Bonzini, 2020/08/17
- [PATCH 100/150] meson: convert hw/pcmcia, Paolo Bonzini, 2020/08/17
- [PATCH 103/150] meson: convert hw/pci, Paolo Bonzini, 2020/08/17
- Re: [PATCH 103/150] meson: convert hw/pci,
Philippe Mathieu-Daudé <=
- [PATCH 101/150] meson: convert hw/pci-host, Paolo Bonzini, 2020/08/17
- [PATCH 102/150] meson: convert hw/pci-bridge, Paolo Bonzini, 2020/08/17
- [PATCH 104/150] meson: convert hw/nvram, Paolo Bonzini, 2020/08/17
- [PATCH 105/150] meson: convert hw/rdma, Paolo Bonzini, 2020/08/17
- [PATCH 106/150] meson: convert hw/net, Paolo Bonzini, 2020/08/17
- [PATCH 107/150] meson: convert hw/misc, Paolo Bonzini, 2020/08/17
- [PATCH 108/150] meson: convert hw/isa, Paolo Bonzini, 2020/08/17