linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors
@ 2020-02-13 16:34 Mahesh Salgaonkar
  2020-02-15  6:23 ` Leonardo Bras
  0 siblings, 1 reply; 4+ messages in thread
From: Mahesh Salgaonkar @ 2020-02-13 16:34 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Michael Neuling

POWER9P PVR bits are same as that of POWER9. Hence mask off only the
relevant bits for the major revision similar to POWER9.

Without this patch the cpuinfo output shows 17.0 as revision:

$ cat /proc/cpuinfo
processor	: 0
cpu		: POWER9P, altivec supported
clock		: 2950.000000MHz
revision	: 17.0 (pvr 004f 1100)

With this change it reflects the correct revision:

$ cat /proc/cpuinfo
processor	: 0
cpu		: POWER9P, altivec supported
clock		: 2633.000000MHz
revision	: 1.0 (pvr 004f 1100)

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/setup-common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 488f1eecc0de..37342ec42cb3 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -315,6 +315,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 				min = pvr & 0xFF;
 				break;
 			case 0x004e: /* POWER9 bits 12-15 give chip type */
+			case 0x004f: /* POWER9P bits 12-15 give chip type */
 				maj = (pvr >> 8) & 0x0F;
 				min = pvr & 0xFF;
 				break;


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

* Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors
  2020-02-13 16:34 [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors Mahesh Salgaonkar
@ 2020-02-15  6:23 ` Leonardo Bras
  2020-02-17 14:11   ` Leonardo Bras
  0 siblings, 1 reply; 4+ messages in thread
From: Leonardo Bras @ 2020-02-15  6:23 UTC (permalink / raw)
  To: Mahesh Salgaonkar, linuxppc-dev; +Cc: Michael Neuling

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> writes:

Hello Mahesh,

> POWER9P PVR bits are same as that of POWER9. Hence mask off only the
> relevant bits for the major revision similar to POWER9.
>
> Without this patch the cpuinfo output shows 17.0 as revision:
>
> $ cat /proc/cpuinfo
> processor     : 0
> cpu           : POWER9P, altivec supported
> clock         : 2950.000000MHz
> revision      : 17.0 (pvr 004f 1100)
>
> With this change it reflects the correct revision:
>
> $ cat /proc/cpuinfo
> processor     : 0
> cpu           : POWER9P, altivec supported
> clock         : 2633.000000MHz
> revision      : 1.0 (pvr 004f 1100)
>
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/setup-common.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 488f1eecc0de..37342ec42cb3 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -315,6 +315,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
>                               min = pvr & 0xFF;
>                               break;
>                       case 0x004e: /* POWER9 bits 12-15 give chip type */
> +                     case 0x004f: /* POWER9P bits 12-15 give chip type */
>                               maj = (pvr >> 8) & 0x0F;
>                               min = pvr & 0xFF;
>                               break;

Seems fine to me.

FWIW:
Reviwed-by: Leonardo Bras <leonardo@linux.ibm.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors
  2020-02-15  6:23 ` Leonardo Bras
@ 2020-02-17 14:11   ` Leonardo Bras
  0 siblings, 0 replies; 4+ messages in thread
From: Leonardo Bras @ 2020-02-17 14:11 UTC (permalink / raw)
  To: Mahesh Salgaonkar, linuxppc-dev; +Cc: Michael Neuling

[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]

On Sat, 2020-02-15 at 03:23 -0300, Leonardo Bras wrote:
> Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> writes:
> 
> Hello Mahesh,
> 
> > POWER9P PVR bits are same as that of POWER9. Hence mask off only the
> > relevant bits for the major revision similar to POWER9.
> > 
> > Without this patch the cpuinfo output shows 17.0 as revision:
> > 
> > $ cat /proc/cpuinfo
> > processor     : 0
> > cpu           : POWER9P, altivec supported
> > clock         : 2950.000000MHz
> > revision      : 17.0 (pvr 004f 1100)
> > 
> > With this change it reflects the correct revision:
> > 
> > $ cat /proc/cpuinfo
> > processor     : 0
> > cpu           : POWER9P, altivec supported
> > clock         : 2633.000000MHz
> > revision      : 1.0 (pvr 004f 1100)
> > 
> > Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/kernel/setup-common.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> > index 488f1eecc0de..37342ec42cb3 100644
> > --- a/arch/powerpc/kernel/setup-common.c
> > +++ b/arch/powerpc/kernel/setup-common.c
> > @@ -315,6 +315,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> >                               min = pvr & 0xFF;
> >                               break;
> >                       case 0x004e: /* POWER9 bits 12-15 give chip type */
> > +                     case 0x004f: /* POWER9P bits 12-15 give chip type */
> >                               maj = (pvr >> 8) & 0x0F;
> >                               min = pvr & 0xFF;
> >                               break;
> 
> Seems fine to me.
> 
> FWIW:
> Reviwed-by: Leonardo Bras <leonardo@linux.ibm.com>

Sorry, typo.
Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors
@ 2020-02-15  6:12 Leonardo Bras
  0 siblings, 0 replies; 4+ messages in thread
From: Leonardo Bras @ 2020-02-15  6:12 UTC (permalink / raw)
  To: mahesh, linuxppc-dev; +Cc: mikey

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> writes:

Hello Mahesh,

> POWER9P PVR bits are same as that of POWER9. Hence mask off only the
> relevant bits for the major revision similar to POWER9.
>
> Without this patch the cpuinfo output shows 17.0 as revision:
>
> $ cat /proc/cpuinfo
> processor	: 0
> cpu		: POWER9P, altivec supported
> clock		: 2950.000000MHz
> revision	: 17.0 (pvr 004f 1100)
>
> With this change it reflects the correct revision:
>
> $ cat /proc/cpuinfo
> processor	: 0
> cpu		: POWER9P, altivec supported
> clock		: 2633.000000MHz
> revision	: 1.0 (pvr 004f 1100)
>
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/setup-common.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 488f1eecc0de..37342ec42cb3 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -315,6 +315,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
>  				min = pvr & 0xFF;
>  				break;
>  			case 0x004e: /* POWER9 bits 12-15 give chip type */
> +			case 0x004f: /* POWER9P bits 12-15 give chip type */
>  				maj = (pvr >> 8) & 0x0F;
>  				min = pvr & 0xFF;
>  				break;

Seems fine to me.

FWIW:
Reviwed-by: Leonardo Bras <leonardo@linux.ibm.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-02-17 14:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 16:34 [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors Mahesh Salgaonkar
2020-02-15  6:23 ` Leonardo Bras
2020-02-17 14:11   ` Leonardo Bras
2020-02-15  6:12 Leonardo Bras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).