Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Fri, Dec 01, 2017 at 06:29:39PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > > On 29/11/2017 10:46, David Gibson wrote: > > > > include/hw/pci/pci_bus.h is now very small and can only safely be > > > > included > > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > > > > I don't get the benefit from merging the header files. > > > I would go the other way around and find stuff specific > > > to pci_bus and add it there, like the pci_bus_new* > > > you touched in the prev patch. > > > > Hrm. Except the point of the earlier patch was that those are > > actually spoecific to root buses, so would really belong in say > > pci-host.h, rather than pci-bus.h. > > > > A log of PCI stuff deals with interaction between the device and bus > > though, so it just seemed like more trouble than it was worth to go > > disentangling them properly. > > > > > Maybe if *all* code files requiring pci.h would automatically > > > need pci_bus.h would make sense, but I didn't check that. > > > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > > fair few do as you can see from the diff. Well, I guess it's up to > > Michael. I'll be tolerably content either way - I'd say this is the > > least important patch of the series. > > I'm inclined to agree with Marcel also because it's lots of noise for no > real win. The next patch depends on this one. I skipped this and next > one, pls feel free to repost next one. Ok, will do. I have some other cleanups in mind, so if I can finish them time, I'll fold them in as well. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Sun, Dec 03, 2017 at 07:07:36AM +0200, Michael S. Tsirkin wrote: > On Sat, Dec 02, 2017 at 11:59:20AM +1100, David Gibson wrote: > > On Fri, Dec 01, 2017 at 06:29:39PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > > > > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > > > > On 29/11/2017 10:46, David Gibson wrote: > > > > > > include/hw/pci/pci_bus.h is now very small and can only safely be > > > > > > included > > > > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > > > > > > > > > > I don't get the benefit from merging the header files. > > > > > I would go the other way around and find stuff specific > > > > > to pci_bus and add it there, like the pci_bus_new* > > > > > you touched in the prev patch. > > > > > > > > Hrm. Except the point of the earlier patch was that those are > > > > actually spoecific to root buses, so would really belong in say > > > > pci-host.h, rather than pci-bus.h. > > > > > > > > A log of PCI stuff deals with interaction between the device and bus > > > > though, so it just seemed like more trouble than it was worth to go > > > > disentangling them properly. > > > > > > > > > Maybe if *all* code files requiring pci.h would automatically > > > > > need pci_bus.h would make sense, but I didn't check that. > > > > > > > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > > > > fair few do as you can see from the diff. Well, I guess it's up to > > > > Michael. I'll be tolerably content either way - I'd say this is the > > > > least important patch of the series. > > > > > > I'm inclined to agree with Marcel also because it's lots of noise for no > > > real win. The next patch depends on this one. I skipped this and next > > > one, pls feel free to repost next one. > > > > Ok, will do. Is the tree you've merged the others to public > > somewhere, so I can rebase on it? > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git branch is named > pci Thanks. > pls note this is a rebased branch, commit IDs won't be stable. Understood. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Sat, Dec 02, 2017 at 11:59:20AM +1100, David Gibson wrote: > On Fri, Dec 01, 2017 at 06:29:39PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > > > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > > > On 29/11/2017 10:46, David Gibson wrote: > > > > > include/hw/pci/pci_bus.h is now very small and can only safely be > > > > > included > > > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > > > > > > > I don't get the benefit from merging the header files. > > > > I would go the other way around and find stuff specific > > > > to pci_bus and add it there, like the pci_bus_new* > > > > you touched in the prev patch. > > > > > > Hrm. Except the point of the earlier patch was that those are > > > actually spoecific to root buses, so would really belong in say > > > pci-host.h, rather than pci-bus.h. > > > > > > A log of PCI stuff deals with interaction between the device and bus > > > though, so it just seemed like more trouble than it was worth to go > > > disentangling them properly. > > > > > > > Maybe if *all* code files requiring pci.h would automatically > > > > need pci_bus.h would make sense, but I didn't check that. > > > > > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > > > fair few do as you can see from the diff. Well, I guess it's up to > > > Michael. I'll be tolerably content either way - I'd say this is the > > > least important patch of the series. > > > > I'm inclined to agree with Marcel also because it's lots of noise for no > > real win. The next patch depends on this one. I skipped this and next > > one, pls feel free to repost next one. > > Ok, will do. Is the tree you've merged the others to public > somewhere, so I can rebase on it? git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git branch is named pci pls note this is a rebased branch, commit IDs won't be stable. > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au| minimalist, thank you. NOT _the_ > _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Fri, Dec 01, 2017 at 06:29:39PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > > On 29/11/2017 10:46, David Gibson wrote: > > > > include/hw/pci/pci_bus.h is now very small and can only safely be > > > > included > > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > > > > I don't get the benefit from merging the header files. > > > I would go the other way around and find stuff specific > > > to pci_bus and add it there, like the pci_bus_new* > > > you touched in the prev patch. > > > > Hrm. Except the point of the earlier patch was that those are > > actually spoecific to root buses, so would really belong in say > > pci-host.h, rather than pci-bus.h. > > > > A log of PCI stuff deals with interaction between the device and bus > > though, so it just seemed like more trouble than it was worth to go > > disentangling them properly. > > > > > Maybe if *all* code files requiring pci.h would automatically > > > need pci_bus.h would make sense, but I didn't check that. > > > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > > fair few do as you can see from the diff. Well, I guess it's up to > > Michael. I'll be tolerably content either way - I'd say this is the > > least important patch of the series. > > I'm inclined to agree with Marcel also because it's lots of noise for no > real win. The next patch depends on this one. I skipped this and next > one, pls feel free to repost next one. Ok, will do. Is the tree you've merged the others to public somewhere, so I can rebase on it? -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > On 29/11/2017 10:46, David Gibson wrote: > > > include/hw/pci/pci_bus.h is now very small and can only safely be included > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > I don't get the benefit from merging the header files. > > I would go the other way around and find stuff specific > > to pci_bus and add it there, like the pci_bus_new* > > you touched in the prev patch. > > Hrm. Except the point of the earlier patch was that those are > actually spoecific to root buses, so would really belong in say > pci-host.h, rather than pci-bus.h. > > A log of PCI stuff deals with interaction between the device and bus > though, so it just seemed like more trouble than it was worth to go > disentangling them properly. > > > Maybe if *all* code files requiring pci.h would automatically > > need pci_bus.h would make sense, but I didn't check that. > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > fair few do as you can see from the diff. Well, I guess it's up to > Michael. I'll be tolerably content either way - I'd say this is the > least important patch of the series. I'm inclined to agree with Marcel also because it's lots of noise for no real win. The next patch depends on this one. I skipped this and next one, pls feel free to repost next one. > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au| minimalist, thank you. NOT _the_ > _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On 30/11/2017 6:02, David Gibson wrote: On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: On 29/11/2017 10:46, David Gibson wrote: include/hw/pci/pci_bus.h is now very small and can only safely be included after hw/pci/pci.h. So, just fold it into pci.h. I don't get the benefit from merging the header files. I would go the other way around and find stuff specific to pci_bus and add it there, like the pci_bus_new* you touched in the prev patch. Hrm. Except the point of the earlier patch was that those are actually spoecific to root buses, so would really belong in say pci-host.h, rather than pci-bus.h. A log of PCI stuff deals with interaction between the device and bus though, so it just seemed like more trouble than it was worth to go disentangling them properly. Maybe if *all* code files requiring pci.h would automatically need pci_bus.h would make sense, but I didn't check that. Yeah, I don't think every user of pci.h needs pci_bus.h, although a fair few do as you can see from the diff. Well, I guess it's up to Michael. I'll be tolerably content either way - I'd say this is the least important patch of the series. Agreed, Thanks, Marcel
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Thu, Nov 30, 2017 at 03:02:48PM +1100, David Gibson wrote: > On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > > On 29/11/2017 10:46, David Gibson wrote: > > > include/hw/pci/pci_bus.h is now very small and can only safely be included > > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > > > > I don't get the benefit from merging the header files. > > I would go the other way around and find stuff specific > > to pci_bus and add it there, like the pci_bus_new* > > you touched in the prev patch. > > Hrm. Except the point of the earlier patch was that those are > actually spoecific to root buses, so would really belong in say > pci-host.h, rather than pci-bus.h. > > A log of PCI stuff deals with interaction between the device and bus > though, so it just seemed like more trouble than it was worth to go > disentangling them properly. > > > Maybe if *all* code files requiring pci.h would automatically > > need pci_bus.h would make sense, but I didn't check that. > > Yeah, I don't think every user of pci.h needs pci_bus.h, although a > fair few do as you can see from the diff. Well, I guess it's up to > Michael. I'll be tolerably content either way - I'd say this is the > least important patch of the series. I would tend to keep pci_bus.h too considering that it's a separate header file already (though I see that Linux doesn't have that specific pci_bus.h, but everything is in pci.h). Or, if we really want to do that, IMHO we can also consider to include pci_bus.h directly in pci.h to avoid movement within headers. Thanks, -- Peter Xu
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On Wed, Nov 29, 2017 at 12:38:00PM +0200, Marcel Apfelbaum wrote: > On 29/11/2017 10:46, David Gibson wrote: > > include/hw/pci/pci_bus.h is now very small and can only safely be included > > after hw/pci/pci.h. So, just fold it into pci.h. > > > > I don't get the benefit from merging the header files. > I would go the other way around and find stuff specific > to pci_bus and add it there, like the pci_bus_new* > you touched in the prev patch. Hrm. Except the point of the earlier patch was that those are actually spoecific to root buses, so would really belong in say pci-host.h, rather than pci-bus.h. A log of PCI stuff deals with interaction between the device and bus though, so it just seemed like more trouble than it was worth to go disentangling them properly. > Maybe if *all* code files requiring pci.h would automatically > need pci_bus.h would make sense, but I didn't check that. Yeah, I don't think every user of pci.h needs pci_bus.h, although a fair few do as you can see from the diff. Well, I guess it's up to Michael. I'll be tolerably content either way - I'd say this is the least important patch of the series. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
Re: [Qemu-devel] [for-2.12 3/7] pci: Fold pci_bus.h into pci.h
On 29/11/2017 10:46, David Gibson wrote: include/hw/pci/pci_bus.h is now very small and can only safely be included after hw/pci/pci.h. So, just fold it into pci.h. I don't get the benefit from merging the header files. I would go the other way around and find stuff specific to pci_bus and add it there, like the pci_bus_new* you touched in the prev patch. Maybe if *all* code files requiring pci.h would automatically need pci_bus.h would make sense, but I didn't check that. Thanks, Marcel Signed-off-by: David Gibson--- hw/acpi/pcihp.c | 1 - hw/i386/acpi-build.c| 1 - hw/i386/amd_iommu.h | 1 - hw/i386/intel_iommu.c | 1 - hw/i386/pc.c| 1 - hw/isa/lpc_ich9.c | 1 - hw/pci-bridge/dec.c | 1 - hw/pci-bridge/pci_bridge_dev.c | 1 - hw/pci-bridge/pci_expander_bridge.c | 1 - hw/pci-bridge/pcie_pci_bridge.c | 1 - hw/pci-host/apb.c | 1 - hw/pci-host/prep.c | 1 - hw/pci-host/versatile.c | 1 - hw/pci/pci.c| 1 - hw/pci/pci_bridge.c | 1 - hw/pci/pci_host.c | 1 - hw/pci/pcie.c | 1 - hw/pci/pcie_aer.c | 1 - hw/pci/shpc.c | 1 - hw/ppc/spapr_pci.c | 1 - hw/s390x/s390-pci-bus.c | 1 - hw/sparc64/sun4u.c | 1 - include/hw/i386/ich9.h | 1 - include/hw/pci/pci.h| 44 -- include/hw/pci/pci_bridge.h | 1 - include/hw/pci/pci_bus.h| 47 - include/hw/pci/pcie_port.h | 1 - 27 files changed, 42 insertions(+), 74 deletions(-) delete mode 100644 include/hw/pci/pci_bus.h diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 7da51c0569..0da905ab3a 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -34,7 +34,6 @@ #include "sysemu/sysemu.h" #include "exec/ioport.h" #include "exec/address-spaces.h" -#include "hw/pci/pci_bus.h" #include "qapi/error.h" #include "qom/qom-qobject.h" diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 73519ab3ac..bda5ef1307 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -51,7 +51,6 @@ #include "hw/acpi/piix4.h" #include "hw/acpi/pcihp.h" #include "hw/i386/ich9.h" -#include "hw/pci/pci_bus.h" #include "hw/pci-host/q35.h" #include "hw/i386/x86-iommu.h" diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index d370ae3549..b587f6b49f 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -27,7 +27,6 @@ #include "hw/sysbus.h" #include "sysemu/dma.h" #include "hw/i386/pc.h" -#include "hw/pci/pci_bus.h" #include "hw/i386/x86-iommu.h" /* Capability registers */ diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 3a5bb0bc2e..3ef4bfbe05 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -26,7 +26,6 @@ #include "exec/address-spaces.h" #include "intel_iommu_internal.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_bus.h" #include "hw/i386/pc.h" #include "hw/i386/apic-msidef.h" #include "hw/boards.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c3afe5b7f1..5380a004be 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -31,7 +31,6 @@ #include "hw/block/fdc.h" #include "hw/ide.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_bus.h" #include "hw/nvram/fw_cfg.h" #include "hw/timer/hpet.h" #include "hw/smbios/smbios.h" diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index ec3c9f7d0b..e77a4abb15 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -44,7 +44,6 @@ #include "hw/i386/ich9.h" #include "hw/acpi/acpi.h" #include "hw/acpi/ich9.h" -#include "hw/pci/pci_bus.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h" #include "qom/cpu.h" diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 84492d5e5f..ae4b9697ed 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -29,7 +29,6 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" #include "hw/pci/pci_bridge.h" -#include "hw/pci/pci_bus.h" /* debug DEC */ //#define DEBUG_DEC diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index d56f6638c2..bc3c8d9f57 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -27,7 +27,6 @@ #include "hw/pci/shpc.h" #include "hw/pci/slotid_cap.h" #include "exec/memory.h" -#include "hw/pci/pci_bus.h" #include "hw/hotplug.h" #define TYPE_PCI_BRIDGE_DEV "pci-bridge" diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c index b2fa829e29..5652cf06e9 100644 --- a/hw/pci-bridge/pci_expander_bridge.c +++ b/hw/pci-bridge/pci_expander_bridge.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h"