LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: Leonardo Bras <leonardo@linux.ibm.com>
To: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: Michael Neuling <mikey@neuling.org>
Subject: Re: [PATCH] powerpc: Fix /proc/cpuinfo revision for POWER9P processors
Date: Sat, 15 Feb 2020 03:23:14 -0300
Message-ID: <2f2e88ca614ea1fd37d347a189f89c8bfa6b1c9c.camel@linux.ibm.com> (raw)
In-Reply-To: <158161167949.29594.6467033073126346958.stgit@jupiter>

[-- 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 --]

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 16:34 Mahesh Salgaonkar
2020-02-15  6:23 ` Leonardo Bras [this message]
2020-02-17 14:11   ` Leonardo Bras
2020-02-15  6:12 Leonardo Bras

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f2e88ca614ea1fd37d347a189f89c8bfa6b1c9c.camel@linux.ibm.com \
    --to=leonardo@linux.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mikey@neuling.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git