All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9 DD2
@ 2017-06-15  1:53 Michael Neuling
  2017-06-29 12:21 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Neuling @ 2017-06-15  1:53 UTC (permalink / raw)
  To: mpe; +Cc: benh, linuxppc-dev, mikey

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>
---
 arch/powerpc/kernel/setup-common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 857129acf9..94a948207c 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -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;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc: Fix /proc/cpuinfo revision for POWER9 DD2
  2017-06-15  1:53 [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9 DD2 Michael Neuling
@ 2017-06-29 12:21 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-06-29 12:21 UTC (permalink / raw)
  To: Michael Neuling; +Cc: mikey, linuxppc-dev

On Thu, 2017-06-15 at 01:53:16 UTC, Michael Neuling wrote:
> 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>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/64ebb9a208c6e66316329a6d910181

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15  1:53 [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9 DD2 Michael Neuling
2017-06-29 12:21 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.