Patchwork [07/11] config: handle CONFIG_VGA_ISA=n

login
register
mail settings
Submitter David S. Ahern
Date Jan. 14, 2011, 7:12 p.m.
Message ID <1295032341-6926-8-git-send-email-daahern@cisco.com>
Download mbox | patch
Permalink /patch/79001/
State New
Headers show

Comments

David S. Ahern - Jan. 14, 2011, 7:12 p.m.
Fix compile errors and remove -M isapc option for CONFIG_VGA_ISA=n.

Signed-off-by: David Ahern <daahern@cisco.com>
---
 hw/pc.c      |    2 ++
 hw/pc_piix.c |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
Paolo Bonzini - Jan. 15, 2011, 3:43 p.m.
On 01/14/2011 08:12 PM, David Ahern wrote:
> Fix compile errors and remove -M isapc option for CONFIG_VGA_ISA=n.
>

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

Patch

diff --git a/hw/pc.c b/hw/pc.c
index e7514fd..11b570f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1087,8 +1087,10 @@  void pc_vga_init(PCIBus *pci_bus)
     } else if (std_vga_enabled) {
         if (pci_bus) {
             pci_vga_init(pci_bus);
+#ifdef CONFIG_VGA_ISA
         } else {
             isa_vga_init();
+#endif
         }
     }
 }
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 5046947..7d65e37 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -199,6 +199,7 @@  static void pc_init_pci(ram_addr_t ram_size,
              initrd_filename, cpu_model, 1);
 }
 
+#ifdef CONFIG_VGA_ISA
 static void pc_init_isa(ram_addr_t ram_size,
                         const char *boot_device,
                         const char *kernel_filename,
@@ -212,6 +213,7 @@  static void pc_init_isa(ram_addr_t ram_size,
              kernel_filename, kernel_cmdline,
              initrd_filename, cpu_model, 0);
 }
+#endif
 
 static QEMUMachine pc_machine = {
     .name = "pc-0.14",
@@ -370,12 +372,14 @@  static QEMUMachine pc_machine_v0_10 = {
     },
 };
 
+#ifdef CONFIG_VGA_ISA
 static QEMUMachine isapc_machine = {
     .name = "isapc",
     .desc = "ISA-only PC",
     .init = pc_init_isa,
     .max_cpus = 1,
 };
+#endif
 
 static void pc_machine_init(void)
 {
@@ -384,7 +388,9 @@  static void pc_machine_init(void)
     qemu_register_machine(&pc_machine_v0_12);
     qemu_register_machine(&pc_machine_v0_11);
     qemu_register_machine(&pc_machine_v0_10);
+#ifdef CONFIG_VGA_ISA
     qemu_register_machine(&isapc_machine);
+#endif
 }
 
 machine_init(pc_machine_init);