Patchwork [for-1.6] target-ppc: Fix POWER7+ model

login
register
mail settings
Submitter Andreas Färber
Date Aug. 5, 2013, 8:59 p.m.
Message ID <1375736387-8429-1-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/264805/
State New
Headers show

Comments

Andreas Färber - Aug. 5, 2013, 8:59 p.m.
Commit 03a15a5436ed7723f406f15cc3798aa9991e75b5 claimed to add a POWER7+
model but instead added a "POWER7P" model, with an unhelpful "POWER7P"
description on top. Fix this to "POWER7+" as we already have "POWER3+",
"POWER4+" and "POWER5+" and there being no reason to deviate with the
user-visible command line -cpu POWER7P from the marketing name POWER7+.

Further, don't needlessly deviate from the scheme of naming PVR constant,
QOM type and device description after the exact revision that is in fact
encoded in the PVR used.
That way, we can change the user-friendly alias -cpu POWER7+ to point to a
different revision if we so desire, while not polluting the type namespace.

This naming scheme is sensible and completely orthogonal to how PVRs may
or may not get matched to CPU types.

Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-ppc/cpu-models.c | 5 +++--
 target-ppc/cpu-models.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
Alexander Graf - Aug. 14, 2013, 1:55 p.m.
On 05.08.2013, at 22:59, Andreas Färber wrote:

> Commit 03a15a5436ed7723f406f15cc3798aa9991e75b5 claimed to add a POWER7+
> model but instead added a "POWER7P" model, with an unhelpful "POWER7P"
> description on top. Fix this to "POWER7+" as we already have "POWER3+",
> "POWER4+" and "POWER5+" and there being no reason to deviate with the
> user-visible command line -cpu POWER7P from the marketing name POWER7+.
> 
> Further, don't needlessly deviate from the scheme of naming PVR constant,
> QOM type and device description after the exact revision that is in fact
> encoded in the PVR used.
> That way, we can change the user-friendly alias -cpu POWER7+ to point to a
> different revision if we so desire, while not polluting the type namespace.
> 
> This naming scheme is sensible and completely orthogonal to how PVRs may
> or may not get matched to CPU types.
> 
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Thanks, applied to ppc-next and added a CC to qemu-stable so it gets into 1.6.1.


Alex
Anthony Liguori - Aug. 14, 2013, 4:14 p.m.
Already in 1.6:

commit a7d6b9f084765a834110bb9a2a0329b1a96de792
Author: Andreas Färber <afaerber@suse.de>
Date:   Mon Aug 5 22:59:46 2013 +0200

    target-ppc: Fix POWER7+ model

Regards,

Anthony Liguori

On Wed, Aug 14, 2013 at 8:55 AM, Alexander Graf <agraf@suse.de> wrote:
>
> On 05.08.2013, at 22:59, Andreas Färber wrote:
>
>> Commit 03a15a5436ed7723f406f15cc3798aa9991e75b5 claimed to add a POWER7+
>> model but instead added a "POWER7P" model, with an unhelpful "POWER7P"
>> description on top. Fix this to "POWER7+" as we already have "POWER3+",
>> "POWER4+" and "POWER5+" and there being no reason to deviate with the
>> user-visible command line -cpu POWER7P from the marketing name POWER7+.
>>
>> Further, don't needlessly deviate from the scheme of naming PVR constant,
>> QOM type and device description after the exact revision that is in fact
>> encoded in the PVR used.
>> That way, we can change the user-friendly alias -cpu POWER7+ to point to a
>> different revision if we so desire, while not polluting the type namespace.
>>
>> This naming scheme is sensible and completely orthogonal to how PVRs may
>> or may not get matched to CPU types.
>>
>> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>
> Thanks, applied to ppc-next and added a CC to qemu-stable so it gets into 1.6.1.
>
>
> Alex
>
Alexander Graf - Aug. 14, 2013, 4:19 p.m.
On 14.08.2013, at 18:14, Anthony Liguori wrote:

> Already in 1.6:
> 
> commit a7d6b9f084765a834110bb9a2a0329b1a96de792
> Author: Andreas Färber <afaerber@suse.de>
> Date:   Mon Aug 5 22:59:46 2013 +0200
> 
>    target-ppc: Fix POWER7+ model

Oops, I must've missed the error output:

agraf@boysenberry-1:/home/agraf/release/qemu> git pw am 'target-ppc: Fix POWER7+ model'
git commit --amend
total: 0 errors, 0 warnings, 25 lines checked

Your patch has no obvious style problems and is ready for submission.
Applying: target-ppc: Fix POWER7+ model
error: patch failed: target-ppc/cpu-models.c:1143
error: target-ppc/cpu-models.c: patch does not apply
error: patch failed: target-ppc/cpu-models.h:556
error: target-ppc/cpu-models.h: patch does not apply
Patch failed at 0001 target-ppc: Fix POWER7+ model
The copy of the patch that failed is found in:
   /home/agraf/release/qemu/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Heh - every apply after this obviously went bad too (POWER5 ones). Sigh. I guess I need another vacation :D


Alex
Anthony Liguori - Aug. 14, 2013, 4:27 p.m.
Applied.  Thanks.

Regards,

Anthony Liguori

Patch

diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
index c97c183..b5b8f42 100644
--- a/target-ppc/cpu-models.c
+++ b/target-ppc/cpu-models.c
@@ -1143,8 +1143,8 @@ 
                 "POWER7 v2.1")
     POWERPC_DEF("POWER7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7,
                 "POWER7 v2.3")
-    POWERPC_DEF("POWER7P",       CPU_POWERPC_POWER7P,                POWER7,
-                "POWER7P")
+    POWERPC_DEF("POWER7+_v2.1",  CPU_POWERPC_POWER7P_v21,            POWER7,
+                "POWER7+ v2.1")
     POWERPC_DEF("POWER8_v1.0",   CPU_POWERPC_POWER8_v10,             POWER8,
                 "POWER8 v1.0")
     POWERPC_DEF("970",           CPU_POWERPC_970,                    970,
@@ -1392,6 +1392,7 @@  PowerPCCPUAlias ppc_cpu_aliases[] = {
     { "Dino",  "POWER3" },
     { "POWER3+", "631" },
     { "POWER7", "POWER7_v2.3" },
+    { "POWER7+", "POWER7+_v2.1" },
     { "POWER8", "POWER8_v1.0" },
     { "970fx", "970fx_v3.1" },
     { "970mp", "970mp_v1.1" },
diff --git a/target-ppc/cpu-models.h b/target-ppc/cpu-models.h
index c3c78d1..58c4ea0 100644
--- a/target-ppc/cpu-models.h
+++ b/target-ppc/cpu-models.h
@@ -556,7 +556,7 @@  enum {
     CPU_POWERPC_POWER7_v20         = 0x003F0200,
     CPU_POWERPC_POWER7_v21         = 0x003F0201,
     CPU_POWERPC_POWER7_v23         = 0x003F0203,
-    CPU_POWERPC_POWER7P            = 0x004A0201,
+    CPU_POWERPC_POWER7P_v21        = 0x004A0201,
     CPU_POWERPC_POWER8_v10         = 0x004B0100,
     CPU_POWERPC_970                = 0x00390202,
     CPU_POWERPC_970FX_v10          = 0x00391100,