qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/pci: remove all references to find_i440fx function
@ 2021-07-18 13:16 Ani Sinha
  2021-07-18 14:26 ` Peter Maydell
  2021-07-18 16:24 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Ani Sinha @ 2021-07-18 13:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ani Sinha, Paolo Bonzini, jusual, Michael S. Tsirkin

commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all
uses of find_i440fx() function. This has been replaced by the more generic call
acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx
machine type as well as for the q35 machine type. There seems to be no more any
need to maintain a i440fx specific version of the api call. Remove it.

Tested by building from a clean tree successfully.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 hw/pci-host/i440fx.c         | 8 --------
 include/hw/pci-host/i440fx.h | 1 -
 stubs/meson.build            | 1 -
 stubs/pci-host-piix.c        | 7 -------
 4 files changed, 17 deletions(-)
 delete mode 100644 stubs/pci-host-piix.c

diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 28c9bae899..e08716142b 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -314,14 +314,6 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type,
     return b;
 }
 
-PCIBus *find_i440fx(void)
-{
-    PCIHostState *s = OBJECT_CHECK(PCIHostState,
-                                   object_resolve_path("/machine/i440fx", NULL),
-                                   TYPE_PCI_HOST_BRIDGE);
-    return s ? s->bus : NULL;
-}
-
 static void i440fx_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/include/hw/pci-host/i440fx.h b/include/hw/pci-host/i440fx.h
index 7fcfd9485c..f068aaba8f 100644
--- a/include/hw/pci-host/i440fx.h
+++ b/include/hw/pci-host/i440fx.h
@@ -45,6 +45,5 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type,
                     MemoryRegion *pci_memory,
                     MemoryRegion *ram_memory);
 
-PCIBus *find_i440fx(void);
 
 #endif
diff --git a/stubs/meson.build b/stubs/meson.build
index d3fa8646b3..0faa2a74b7 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -27,7 +27,6 @@ stub_ss.add(files('module-opts.c'))
 stub_ss.add(files('monitor.c'))
 stub_ss.add(files('monitor-core.c'))
 stub_ss.add(files('pci-bus.c'))
-stub_ss.add(files('pci-host-piix.c'))
 stub_ss.add(files('qemu-timer-notify-cb.c'))
 stub_ss.add(files('qmp_memory_device.c'))
 stub_ss.add(files('qmp-command-available.c'))
diff --git a/stubs/pci-host-piix.c b/stubs/pci-host-piix.c
deleted file mode 100644
index 93975adbfe..0000000000
--- a/stubs/pci-host-piix.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "qemu/osdep.h"
-#include "hw/pci-host/i440fx.h"
-
-PCIBus *find_i440fx(void)
-{
-    return NULL;
-}
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/pci: remove all references to find_i440fx function
  2021-07-18 13:16 [PATCH] hw/pci: remove all references to find_i440fx function Ani Sinha
@ 2021-07-18 14:26 ` Peter Maydell
  2021-07-18 16:24 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2021-07-18 14:26 UTC (permalink / raw)
  To: Ani Sinha
  Cc: Paolo Bonzini, Julia Suvorova, QEMU Developers,
	Michael S. Tsirkin

On Sun, 18 Jul 2021 at 14:18, Ani Sinha <ani@anisinha.ca> wrote:
>
> commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all
> uses of find_i440fx() function. This has been replaced by the more generic call
> acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx
> machine type as well as for the q35 machine type. There seems to be no more any
> need to maintain a i440fx specific version of the api call. Remove it.
>
> Tested by building from a clean tree successfully.
>
> Signed-off-by: Ani Sinha <ani@anisinha.ca>
> ---
>  hw/pci-host/i440fx.c         | 8 --------
>  include/hw/pci-host/i440fx.h | 1 -
>  stubs/meson.build            | 1 -
>  stubs/pci-host-piix.c        | 7 -------
>  4 files changed, 17 deletions(-)
>  delete mode 100644 stubs/pci-host-piix.c
>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/pci: remove all references to find_i440fx function
  2021-07-18 13:16 [PATCH] hw/pci: remove all references to find_i440fx function Ani Sinha
  2021-07-18 14:26 ` Peter Maydell
@ 2021-07-18 16:24 ` Philippe Mathieu-Daudé
  2021-07-18 16:44   ` Ani Sinha
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-18 16:24 UTC (permalink / raw)
  To: Ani Sinha, qemu-devel; +Cc: Paolo Bonzini, jusual, Michael S. Tsirkin

On 7/18/21 3:16 PM, Ani Sinha wrote:
> commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all
> uses of find_i440fx() function. This has been replaced by the more generic call
> acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx
> machine type as well as for the q35 machine type. There seems to be no more any
> need to maintain a i440fx specific version of the api call. Remove it.

Yay!

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Tested by building from a clean tree successfully.
> 
> Signed-off-by: Ani Sinha <ani@anisinha.ca>
> ---
>  hw/pci-host/i440fx.c         | 8 --------
>  include/hw/pci-host/i440fx.h | 1 -
>  stubs/meson.build            | 1 -
>  stubs/pci-host-piix.c        | 7 -------
>  4 files changed, 17 deletions(-)
>  delete mode 100644 stubs/pci-host-piix.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/pci: remove all references to find_i440fx function
  2021-07-18 16:24 ` Philippe Mathieu-Daudé
@ 2021-07-18 16:44   ` Ani Sinha
  0 siblings, 0 replies; 4+ messages in thread
From: Ani Sinha @ 2021-07-18 16:44 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Paolo Bonzini, jusual, qemu-devel, Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]



On Sun, 18 Jul 2021, Philippe Mathieu-Daudé wrote:

> On 7/18/21 3:16 PM, Ani Sinha wrote:
> > commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all
> > uses of find_i440fx() function. This has been replaced by the more generic call
> > acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx
> > machine type as well as for the q35 machine type. There seems to be no more any
> > need to maintain a i440fx specific version of the api call. Remove it.
>
> Yay!

Thanks to Julia for making it happen. I was wondering when I shall see
these patches ...

>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> > Tested by building from a clean tree successfully.
> >
> > Signed-off-by: Ani Sinha <ani@anisinha.ca>
> > ---
> >  hw/pci-host/i440fx.c         | 8 --------
> >  include/hw/pci-host/i440fx.h | 1 -
> >  stubs/meson.build            | 1 -
> >  stubs/pci-host-piix.c        | 7 -------
> >  4 files changed, 17 deletions(-)
> >  delete mode 100644 stubs/pci-host-piix.c
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-18 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18 13:16 [PATCH] hw/pci: remove all references to find_i440fx function Ani Sinha
2021-07-18 14:26 ` Peter Maydell
2021-07-18 16:24 ` Philippe Mathieu-Daudé
2021-07-18 16:44   ` Ani Sinha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).