From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0nIm-0005UT-Nh for qemu-devel@nongnu.org; Fri, 05 Jun 2015 04:48:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0nIl-0005TU-05 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 04:48:32 -0400 Received: from mga11.intel.com ([192.55.52.93]:24454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0nIk-0005Sq-R2 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 04:48:30 -0400 From: Tiejun Chen Date: Fri, 5 Jun 2015 16:44:53 +0800 Message-Id: <1433493901-9332-3-git-send-email-tiejun.chen@intel.com> In-Reply-To: <1433493901-9332-1-git-send-email-tiejun.chen@intel.com> References: <1433493901-9332-1-git-send-email-tiejun.chen@intel.com> Subject: [Qemu-devel] [v8][RESEND][PATCH 02/10] pc_init1: pass parameters just with types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com, pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com Cc: qemu-devel@nongnu.org Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c05b7c7..3e2fc04 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -75,7 +75,8 @@ static bool has_reserved_memory = true; static bool kvmclock_enabled = true; /* PC hardware initialisation */ -static void pc_init1(MachineState *machine) +static void pc_init1(MachineState *machine, + const char *host_type, const char *pci_type) { PCMachineState *pc_machine = PC_MACHINE(machine); MemoryRegion *system_memory = get_system_memory(); @@ -202,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, @@ -437,7 +438,7 @@ static void pc_init_isa(MachineState *machine) } x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI); enable_compat_apic_id_mode(); - pc_init1(machine); + pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE); } #ifdef CONFIG_XEN @@ -445,7 +446,7 @@ static void pc_xen_hvm_init(MachineState *machine) { PCIBus *bus; - pc_init1(machine); + pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE); bus = pci_find_primary_bus(); if (bus != NULL) { @@ -461,7 +462,8 @@ static void pc_xen_hvm_init(MachineState *machine) if (compat) { \ compat(machine); \ } \ - pc_init1(machine); \ + pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \ + TYPE_I440FX_PCI_DEVICE); \ } \ DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) -- 1.9.1