build, pci: remove QMP dependency on core PCI code
by introducing pci-stub.c, eliminate QMP dependency on core PCI code rquired by query-pci command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
0ead87c8de
commit
b3a29fd560
@ -169,9 +169,7 @@ hw-obj-y =
|
|||||||
hw-obj-y += vl.o loader.o
|
hw-obj-y += vl.o loader.o
|
||||||
hw-obj-$(CONFIG_VIRTIO) += virtio.o virtio-console.o
|
hw-obj-$(CONFIG_VIRTIO) += virtio.o virtio-console.o
|
||||||
hw-obj-y += fw_cfg.o
|
hw-obj-y += fw_cfg.o
|
||||||
# FIXME: Core PCI code and its direct dependencies are required by the
|
hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
|
||||||
# QMP query-pci command.
|
|
||||||
hw-obj-y += pci.o pci_bridge.o
|
|
||||||
hw-obj-$(CONFIG_PCI) += msix.o msi.o
|
hw-obj-$(CONFIG_PCI) += msix.o msi.o
|
||||||
hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
|
hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
|
||||||
hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
|
hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- Mode: makefile -*-
|
# -*- Mode: makefile -*-
|
||||||
|
|
||||||
GENERATED_HEADERS = config-target.h
|
GENERATED_HEADERS = config-target.h
|
||||||
|
CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
|
||||||
CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
|
CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
|
||||||
|
|
||||||
include ../config-host.mak
|
include ../config-host.mak
|
||||||
@ -188,6 +189,7 @@ ifdef CONFIG_SOFTMMU
|
|||||||
obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
|
obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o
|
||||||
# virtio has to be here due to weird dependency between PCI and virtio-net.
|
# virtio has to be here due to weird dependency between PCI and virtio-net.
|
||||||
# need to fix this properly
|
# need to fix this properly
|
||||||
|
obj-$(CONFIG_NO_PCI) += pci-stub.o
|
||||||
obj-$(CONFIG_VIRTIO) += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
|
obj-$(CONFIG_VIRTIO) += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
|
||||||
obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
|
obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
|
||||||
obj-y += vhost_net.o
|
obj-y += vhost_net.o
|
||||||
|
37
hw/pci-stub.c
Normal file
37
hw/pci-stub.c
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* PCI stubs for plathome that doesn't support pci bus.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010 Isaku Yamahata <yamahata at valinux co jp>
|
||||||
|
* VA Linux Systems Japan K.K.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "monitor.h"
|
||||||
|
#include "pci.h"
|
||||||
|
|
||||||
|
static void pci_error_message(Monitor *mon)
|
||||||
|
{
|
||||||
|
monitor_printf(mon, "PCI devices not supported\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_pci_info(Monitor *mon, QObject **ret_data)
|
||||||
|
{
|
||||||
|
pci_error_message(mon);
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_pci_info_print(Monitor *mon, const QObject *data)
|
||||||
|
{
|
||||||
|
pci_error_message(mon);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user