pci: Cleanup configuration for pci-hotplug.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 37 lines · Michael Tokarev
Quoted 11 lines · David Gibson
pci-hotplug.cand theCONFIG_PCI_HOTPLUGvariable which controls its compilation are misnamed. They're not about PCI hotplug in general, but rather about the pci_add/pci_del interface which are now deprecated in favour of the more general device_add/device_del interface. This patch therefore renames them topci-hotplug-old.candCONFIG_PCI_HOTPLUG_OLD.
CONFIG_PCI_HOTPLUG=ywas listed twice in {i386,x86_64}-softmmu.make for no particular reason, so we clean that up too. In addition it was included in ppc64-softmmu.mak for which the old hotplug interface was never used and is unsuitable, so we remove that too.Quoted 5 lines
Most of
pci-hotplug.cwas additionaly protected by #ifdefTARGET_I386. The small piece which wasn't is only called from thepci_addandpci_delhooks in hmp-commands.hx, which themselves were protected by #ifdefTARGET_I386. This patch therefore also removes the #ifdef frompci-hotplug-old.c, and changes the ifdefs in hmp-commands.hx to useCONFIG_PCI_HOTPLUG_OLD.This patch is wrong, it effectively breaks/removes pci_add/pci_del interface completely.
This is because of this change:
hmp-commands.hx STEXI · line 1080
Quoted 8 lines
hmp-commands.hx +1
-1@@ -1077,7 +1077,7 @@ STEXI Add drive to PCI storage controller. ETEXI -#if defined(TARGET_I386) +#if defined(CONFIG_PCI_HOTPLUG_OLD)The thing is, while
TARGET_I386is #defined for x86,CONFIG_PCI_HOTPLUG_OLD, which is listed in default-configs/$target.mak and config-devices.mak, is not listed in config-host.mak and hence not listed inconfig-host.h. So this code is never compiled.
Quoted 3 lines
Thanks,
/mjt
Just replying to (a) include the list and (b) this matches my findings.
Thanks for sending this, Michael.
-serge