[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC ppc-next 39/39] target-ppc: Convert CPU
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [RFC ppc-next 39/39] target-ppc: Convert CPU definitions |
Date: |
Tue, 12 Feb 2013 17:48:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 |
Am 12.02.2013 11:13, schrieb Andreas Färber:
> Turn the array of model definitions into a set of self-registering QOM
> types with their own class_init. Unique identifiers are obtained from
> the combination of PVR, SVR and family identifiers; this requires all
> alias #defines to be removed from the list. Possibly there are some more
> left after this commit that are not currently being compiled.
>
> Prepares for introducing abstract intermediate CPU types for families.
>
> Keep the right-aligned macro line breaks within 78 chars to aid
> three-way merges.
>
> Signed-off-by: Andreas Färber <address@hidden>
> ---
> target-ppc/cpu-qom.h | 17 ++++-
> target-ppc/cpu.h | 20 ------
> target-ppc/translate_init.c | 152
> ++++++++++++++++++++-----------------------
> 3 Dateien geändert, 85 Zeilen hinzugefügt(+), 104 Zeilen entfernt(-)
[...]
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index fd8bf00..93e38ba 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
[...]
> @@ -10316,20 +10317,7 @@ static const TypeInfo ppc_cpu_type_info = {
>
> static void ppc_cpu_register_types(void)
> {
> - int i;
> -
> type_register_static(&ppc_cpu_type_info);
> -
> - for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) {
> - const ppc_def_t *def = &ppc_defs[i];
> -#if defined(TARGET_PPCEMB)
> - /* When using the ppcemb target, we only support 440 style cores */
> - if (def->mmu_model != POWERPC_MMU_BOOKE) {
> - continue;
> - }
> -#endif
> - ppc_cpu_register_model(def);
> - }
> }
>
> type_init(ppc_cpu_register_types)
Sorry, I forgot to re-add the TARGET_PPCEMB check above.
Still need to think about how to do that inside POWERPC_DEF_SVR() macro.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-ppc] [PATCH ppc-next 08/39] target-ppc: Turn "ppc32" and "ppc64" CPUs into aliases, (continued)
- [Qemu-ppc] [PATCH ppc-next 35/39] target-ppc: Extract 405GPe alias, Andreas Färber, 2013/02/12
- [Qemu-ppc] [PATCH ppc-next 36/39] target-ppc: Extract 970 aliases, Andreas Färber, 2013/02/12
- [Qemu-ppc] [PATCH ppc-next 32/39] target-ppc: Extract MPC52xx alias, Andreas Färber, 2013/02/12
- [Qemu-ppc] [PATCH ppc-next 39/39] target-ppc: Convert CPU definitions, Andreas Färber, 2013/02/12
- Re: [Qemu-ppc] [Qemu-devel] [RFC ppc-next 39/39] target-ppc: Convert CPU definitions,
Andreas Färber <=
- Re: [Qemu-ppc] [PATCH ppc-next 00/39] PowerPCCPU subclasses, remixed, Alexander Graf, 2013/02/13