From 79ca616f291124d166ca173e512c4ace1c2fe8b2 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 6 Jun 2013 18:48:45 +1000 Subject: pci: Cleanup configuration for pci-hotplug.c pci-hotplug.c and the CONFIG_PCI_HOTPLUG variable 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 to pci-hotplug-old.c and CONFIG_PCI_HOTPLUG_OLD. CONFIG_PCI_HOTPLUG=y was 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. Most of pci-hotplug.c was additionaly protected by #ifdef TARGET_I386. The small piece which wasn't is only called from the pci_add and pci_del hooks in hmp-commands.hx, which themselves were protected by #ifdef TARGET_I386. This patch therefore also removes the #ifdef from pci-hotplug-old.c, and changes the ifdefs in hmp-commands.hx to use CONFIG_PCI_HOTPLUG_OLD. Signed-off-by: David Gibson Signed-off-by: Michael S. Tsirkin --- hmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hmp-commands.hx') diff --git a/hmp-commands.hx b/hmp-commands.hx index 915b0d16fa..d1cdcfb71b 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1077,7 +1077,7 @@ STEXI Add drive to PCI storage controller. ETEXI -#if defined(TARGET_I386) +#if defined(CONFIG_PCI_HOTPLUG_OLD) { .name = "pci_add", .args_type = "pci_addr:s,type:s,opts:s?", @@ -1093,7 +1093,7 @@ STEXI Hot-add PCI device. ETEXI -#if defined(TARGET_I386) +#if defined(CONFIG_PCI_HOTPLUG_OLD) { .name = "pci_del", .args_type = "pci_addr:s", -- cgit v1.2.1