Patchwork [08/12] target-openrisc: TYPE_OPENRISC_CPU should be abstract

login
register
mail settings
Submitter Andreas Färber
Date Feb. 1, 2013, 12:44 a.m.
Message ID <1359679480-32356-9-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/217328/
State New
Headers show

Comments

Andreas Färber - Feb. 1, 2013, 12:44 a.m.
A basic assumption of CPU subtypes is that only specific models get
instantiated. A user is not supposed to instantiate an <arch>-cpu.
Suppress it via abstract = true, which also drops or32-cpu from
-cpu ? output.

Cc: qemu-stable@nongnu.org
Cc: Jia Liu <proljc@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-openrisc/cpu.c |    2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

Patch

diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index 54876d9..14f2cbe 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -159,7 +159,7 @@  static const TypeInfo openrisc_cpu_type_info = {
     .parent = TYPE_CPU,
     .instance_size = sizeof(OpenRISCCPU),
     .instance_init = openrisc_cpu_initfn,
-    .abstract = false,
+    .abstract = true,
     .class_size = sizeof(OpenRISCCPUClass),
     .class_init = openrisc_cpu_class_init,
 };