]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Fix /proc/cpuinfo revision for POWER9 DD2
authorMichael Neuling <mikey@neuling.org>
Thu, 15 Jun 2017 01:53:16 +0000 (11:53 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Jun 2017 02:09:07 +0000 (12:09 +1000)
The P9 PVR bits 12-15 don't indicate a revision but instead different
chip configurations.  From BookIV we have:
   Bits      Configuration
    0 :    Scale out 12 cores
    1 :    Scale out 24 cores
    2 :    Scale up  12 cores
    3 :    Scale up  24 cores

DD1 doesn't use this but DD2 does. Linux will mostly use the "Scale
out 24 core" configuration (ie. SMT4 not SMT8) which results in a PVR
of 0x004e1200. The reported revision in /proc/cpuinfo is hence
reported incorrectly as "18.0".

This patch fixes this to mask off only the relevant bits for the major
revision (ie. bits 8-11) for POWER9.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/setup-common.c

index 71dcda91755d51a2e5705f29308239e7e9c7e506..096dee58b9c17803ce22e79e3b518a8de2f20374 100644 (file)
@@ -335,6 +335,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                                maj = ((pvr >> 8) & 0xFF) - 1;
                                min = pvr & 0xFF;
                                break;
+                       case 0x004e: /* POWER9 bits 12-15 give chip type */
+                               maj = (pvr >> 8) & 0x0F;
+                               min = pvr & 0xFF;
+                               break;
                        default:
                                maj = (pvr >> 8) & 0xFF;
                                min = pvr & 0xFF;