From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH8lV-0000ml-9l for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:53:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XH8lQ-0006x1-6S for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:53:13 -0400 Received: from mga01.intel.com ([192.55.52.88]:15706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH8lQ-0006wo-1E for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:53:08 -0400 From: Tiejun Chen Date: Tue, 12 Aug 2014 17:49:15 +0800 Message-Id: <1407836957-29098-3-git-send-email-tiejun.chen@intel.com> In-Reply-To: <1407836957-29098-1-git-send-email-tiejun.chen@intel.com> References: <1407836957-29098-1-git-send-email-tiejun.chen@intel.com> Subject: [Qemu-devel] [v5][PATCH 2/4] pc_init1: pass parameters just with types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com Cc: pbonzini@redhat.com, xen-devel@lists.xensource.com, qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) v5: * Nothing is changed. v4: * New patch to work for patch #1 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bf26550..2bf8046 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -74,7 +74,9 @@ static bool has_reserved_memory = true; /* PC hardware initialisation */ static void pc_init1(MachineState *machine, int pci_enabled, - int kvmclock_enabled) + int kvmclock_enabled, + const char *host_type, + const char *pci_type) { PCMachineState *pc_machine = PC_MACHINE(machine); MemoryRegion *system_memory = get_system_memory(); @@ -201,8 +203,8 @@ static void pc_init1(MachineState *machine, } if (pci_enabled) { - pci_bus = i440fx_init(TYPE_I440FX_PCI_HOST_BRIDGE, - TYPE_I440FX_PCI_DEVICE, + pci_bus = i440fx_init(host_type, + pci_type, &i440fx_state, &piix3_devfn, &isa_bus, gsi, system_memory, system_io, machine->ram_size, below_4g_mem_size, @@ -303,7 +305,8 @@ static void pc_init1(MachineState *machine, static void pc_init_pci(MachineState *machine) { - pc_init1(machine, 1, 1); + pc_init1(machine, 1, 1, TYPE_I440FX_PCI_HOST_BRIDGE, + TYPE_I440FX_PCI_DEVICE); } static void pc_compat_2_0(MachineState *machine) @@ -419,7 +422,8 @@ static void pc_init_pci_1_2(MachineState *machine) static void pc_init_pci_no_kvmclock(MachineState *machine) { pc_compat_1_2(machine); - pc_init1(machine, 1, 0); + pc_init1(machine, 1, 0, TYPE_I440FX_PCI_HOST_BRIDGE, + TYPE_I440FX_PCI_DEVICE); } static void pc_init_isa(MachineState *machine) @@ -437,7 +441,8 @@ static void pc_init_isa(MachineState *machine) } x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI); enable_compat_apic_id_mode(); - pc_init1(machine, 0, 1); + pc_init1(machine, 0, 1, TYPE_I440FX_PCI_HOST_BRIDGE, + TYPE_I440FX_PCI_DEVICE); } #ifdef CONFIG_XEN -- 1.9.1