[ppc-next,37/39] target-ppc: Extract POWER7 alias

Submitted by Andreas Färber on Feb. 12, 2013, 10:13 a.m.

Details

Message ID 1360664012-16824-38-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Feb. 12, 2013, 10:13 a.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-ppc/translate_init.c |    3 +--
 1 Datei geändert, 1 Zeile hinzugefügt(+), 2 Zeilen entfernt(-)

Comments

David Gibson Feb. 13, 2013, 10:57 a.m.
On Tue, Feb 12, 2013 at 11:13:30AM +0100, Andreas Färber wrote:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  target-ppc/translate_init.c |    3 +--
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 2 Zeilen entfernt(-)
> 
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 5e8756c..fa6eba8 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -7317,7 +7317,6 @@ enum {
>      CPU_POWERPC_POWER6             = 0x003E0000,
>      CPU_POWERPC_POWER6_5           = 0x0F000001, /* POWER6 in POWER5 mode */
>      CPU_POWERPC_POWER6A            = 0x0F000002,
> -#define CPU_POWERPC_POWER7           CPU_POWERPC_POWER7_v20
>      CPU_POWERPC_POWER7_v20         = 0x003F0200,
>      CPU_POWERPC_POWER7_v21         = 0x003F0201,
>      CPU_POWERPC_POWER7_v23         = 0x003F0203,
> @@ -8705,7 +8704,6 @@ static const ppc_def_t ppc_defs[] = {
>      POWERPC_DEF("POWER6A",       CPU_POWERPC_POWER6A,                POWER6)
>  #endif
>      /* POWER7                                                                */
> -    POWERPC_DEF("POWER7",        CPU_POWERPC_POWER7,                 POWER7)
>      POWERPC_DEF("POWER7_v2.0",   CPU_POWERPC_POWER7_v20,             POWER7)
>      POWERPC_DEF("POWER7_v2.1",   CPU_POWERPC_POWER7_v21,             POWER7)
>      POWERPC_DEF("POWER7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7)
> @@ -9069,6 +9067,7 @@ static const PowerPCCPUAlias ppc_cpu_aliases[] = {
>      { "Boxer", "POWER3" },
>      { "Dino",  "POWER3" },
>      { "POWER3+", "631" },
> +    { "POWER7", "POWER7_v2.0" },

Hrm, we should probably alias plain "POWER7" to the more recent v2.3
rather than v2.0.  They're all identical for now, but it's always
possible that could change in future.
Alexander Graf Feb. 13, 2013, 11:15 a.m.
On 13.02.2013, at 11:57, David Gibson wrote:

> On Tue, Feb 12, 2013 at 11:13:30AM +0100, Andreas Färber wrote:
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>> target-ppc/translate_init.c |    3 +--
>> 1 Datei geändert, 1 Zeile hinzugefügt(+), 2 Zeilen entfernt(-)
>> 
>> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
>> index 5e8756c..fa6eba8 100644
>> --- a/target-ppc/translate_init.c
>> +++ b/target-ppc/translate_init.c
>> @@ -7317,7 +7317,6 @@ enum {
>>     CPU_POWERPC_POWER6             = 0x003E0000,
>>     CPU_POWERPC_POWER6_5           = 0x0F000001, /* POWER6 in POWER5 mode */
>>     CPU_POWERPC_POWER6A            = 0x0F000002,
>> -#define CPU_POWERPC_POWER7           CPU_POWERPC_POWER7_v20
>>     CPU_POWERPC_POWER7_v20         = 0x003F0200,
>>     CPU_POWERPC_POWER7_v21         = 0x003F0201,
>>     CPU_POWERPC_POWER7_v23         = 0x003F0203,
>> @@ -8705,7 +8704,6 @@ static const ppc_def_t ppc_defs[] = {
>>     POWERPC_DEF("POWER6A",       CPU_POWERPC_POWER6A,                POWER6)
>> #endif
>>     /* POWER7                                                                */
>> -    POWERPC_DEF("POWER7",        CPU_POWERPC_POWER7,                 POWER7)
>>     POWERPC_DEF("POWER7_v2.0",   CPU_POWERPC_POWER7_v20,             POWER7)
>>     POWERPC_DEF("POWER7_v2.1",   CPU_POWERPC_POWER7_v21,             POWER7)
>>     POWERPC_DEF("POWER7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7)
>> @@ -9069,6 +9067,7 @@ static const PowerPCCPUAlias ppc_cpu_aliases[] = {
>>     { "Boxer", "POWER3" },
>>     { "Dino",  "POWER3" },
>>     { "POWER3+", "631" },
>> +    { "POWER7", "POWER7_v2.0" },
> 
> Hrm, we should probably alias plain "POWER7" to the more recent v2.3
> rather than v2.0.  They're all identical for now, but it's always
> possible that could change in future.

Agreed, but that's for a future patch. This one is only refactoring :)


Alex
David Gibson Feb. 13, 2013, 11:52 a.m.
On Wed, Feb 13, 2013 at 12:15:41PM +0100, Alexander Graf wrote:
> 
> On 13.02.2013, at 11:57, David Gibson wrote:
> 
> > On Tue, Feb 12, 2013 at 11:13:30AM +0100, Andreas Färber wrote:
> >> Signed-off-by: Andreas Färber <afaerber@suse.de>
> >> ---
> >> target-ppc/translate_init.c |    3 +--
> >> 1 Datei geändert, 1 Zeile hinzugefügt(+), 2 Zeilen entfernt(-)
> >> 
> >> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> >> index 5e8756c..fa6eba8 100644
> >> --- a/target-ppc/translate_init.c
> >> +++ b/target-ppc/translate_init.c
> >> @@ -7317,7 +7317,6 @@ enum {
> >>     CPU_POWERPC_POWER6             = 0x003E0000,
> >>     CPU_POWERPC_POWER6_5           = 0x0F000001, /* POWER6 in POWER5 mode */
> >>     CPU_POWERPC_POWER6A            = 0x0F000002,
> >> -#define CPU_POWERPC_POWER7           CPU_POWERPC_POWER7_v20
> >>     CPU_POWERPC_POWER7_v20         = 0x003F0200,
> >>     CPU_POWERPC_POWER7_v21         = 0x003F0201,
> >>     CPU_POWERPC_POWER7_v23         = 0x003F0203,
> >> @@ -8705,7 +8704,6 @@ static const ppc_def_t ppc_defs[] = {
> >>     POWERPC_DEF("POWER6A",       CPU_POWERPC_POWER6A,                POWER6)
> >> #endif
> >>     /* POWER7                                                                */
> >> -    POWERPC_DEF("POWER7",        CPU_POWERPC_POWER7,                 POWER7)
> >>     POWERPC_DEF("POWER7_v2.0",   CPU_POWERPC_POWER7_v20,             POWER7)
> >>     POWERPC_DEF("POWER7_v2.1",   CPU_POWERPC_POWER7_v21,             POWER7)
> >>     POWERPC_DEF("POWER7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7)
> >> @@ -9069,6 +9067,7 @@ static const PowerPCCPUAlias ppc_cpu_aliases[] = {
> >>     { "Boxer", "POWER3" },
> >>     { "Dino",  "POWER3" },
> >>     { "POWER3+", "631" },
> >> +    { "POWER7", "POWER7_v2.0" },
> > 
> > Hrm, we should probably alias plain "POWER7" to the more recent v2.3
> > rather than v2.0.  They're all identical for now, but it's always
> > possible that could change in future.
> 
> Agreed, but that's for a future patch. This one is only refactoring
> :)

Yeah, fair enough.  I missed that the PVR it referenced was itself
already set to the v2.0 one.

Patch hide | download patch | download mbox

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 5e8756c..fa6eba8 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -7317,7 +7317,6 @@  enum {
     CPU_POWERPC_POWER6             = 0x003E0000,
     CPU_POWERPC_POWER6_5           = 0x0F000001, /* POWER6 in POWER5 mode */
     CPU_POWERPC_POWER6A            = 0x0F000002,
-#define CPU_POWERPC_POWER7           CPU_POWERPC_POWER7_v20
     CPU_POWERPC_POWER7_v20         = 0x003F0200,
     CPU_POWERPC_POWER7_v21         = 0x003F0201,
     CPU_POWERPC_POWER7_v23         = 0x003F0203,
@@ -8705,7 +8704,6 @@  static const ppc_def_t ppc_defs[] = {
     POWERPC_DEF("POWER6A",       CPU_POWERPC_POWER6A,                POWER6)
 #endif
     /* POWER7                                                                */
-    POWERPC_DEF("POWER7",        CPU_POWERPC_POWER7,                 POWER7)
     POWERPC_DEF("POWER7_v2.0",   CPU_POWERPC_POWER7_v20,             POWER7)
     POWERPC_DEF("POWER7_v2.1",   CPU_POWERPC_POWER7_v21,             POWER7)
     POWERPC_DEF("POWER7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7)
@@ -9069,6 +9067,7 @@  static const PowerPCCPUAlias ppc_cpu_aliases[] = {
     { "Boxer", "POWER3" },
     { "Dino",  "POWER3" },
     { "POWER3+", "631" },
+    { "POWER7", "POWER7_v2.0" },
     { "970fx", "970fx_v3.1" },
     { "970mp", "970mp_v1.1" },
     { "Apache", "RS64" },