diff mbox

[qom-cpu,for-1.4] target-openrisc: TYPE_OPENRISC_CPU should be abstract

Message ID 1359323276-20313-1-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Jan. 27, 2013, 9:47 p.m. UTC
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(-)

Comments

Andreas Färber Jan. 29, 2013, 11:15 p.m. UTC | #1
Am 27.01.2013 22:47, schrieb Andreas Färber:
> 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>

Ping? Can one of you please confirm that this change is okay or explain
why not?

My pending CPU type rename patch depends on this and Hard Freeze is this
Friday.
http://patchwork.ozlabs.org/patch/216066/

Thanks,
Andreas

> ---
>  target-openrisc/cpu.c |    2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> 
> 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,
>  };
Andreas Färber Jan. 31, 2013, 11:28 p.m. UTC | #2
Am 30.01.2013 00:15, schrieb Andreas Färber:
> Am 27.01.2013 22:47, schrieb Andreas Färber:
>> 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>
> 
> Ping? Can one of you please confirm that this change is okay or explain
> why not?

Chinese New Year holidays are more than a week ahead but still no patch
review... Since today is Hard Freeze, I'm applying this to qom-cpu:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

If this causes a problem, we can still apply a bugfix during the freeze.

Andreas

> My pending CPU type rename patch depends on this and Hard Freeze is this
> Friday.
> http://patchwork.ozlabs.org/patch/216066/
> 
> Thanks,
> Andreas
> 
>> ---
>>  target-openrisc/cpu.c |    2 +-
>>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>>
>> 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,
>>  };
diff mbox

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,
 };