All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Detect POWER9 architected mode
@ 2017-02-16 23:59 Russell Currey
  2017-02-17  0:57 ` Michael Neuling
  2017-02-17  2:44 ` Suraj Jitindar Singh
  0 siblings, 2 replies; 4+ messages in thread
From: Russell Currey @ 2017-02-16 23:59 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus, mikey, Russell Currey

Signed-off-by: Russell Currey <ruscur@russell.cc>
---
 arch/powerpc/kernel/cputable.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 6a82ef039c50..d23a54b09436 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -386,6 +386,25 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.machine_check_early	= __machine_check_early_realmode_p8,
 		.platform		= "power8",
 	},
+	{	/* 3.00-compliant processor, i.e. Power9 "architected" mode */
+		.pvr_mask		= 0xffffffff,
+		.pvr_value		= 0x0f000005,
+		.cpu_name		= "POWER9 (architected)",
+		.cpu_features		= CPU_FTRS_POWER9,
+		.cpu_user_features	= COMMON_USER_POWER9,
+		.cpu_user_features2	= COMMON_USER2_POWER9,
+		.mmu_features		= MMU_FTRS_POWER9,
+		.icache_bsize		= 128,
+		.dcache_bsize		= 128,
+		.num_pmcs		= 6,
+		.pmc_type		= PPC_PMC_IBM,
+		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
+		.oprofile_type		= PPC_OPROFILE_INVALID,
+		.cpu_setup		= __setup_cpu_power9,
+		.cpu_restore		= __restore_cpu_power9,
+		.flush_tlb		= __flush_tlb_power9,
+		.platform		= "power9",
+	},
 	{	/* Power7 */
 		.pvr_mask		= 0xffff0000,
 		.pvr_value		= 0x003f0000,
-- 
2.11.1

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

* Re: [PATCH] powerpc: Detect POWER9 architected mode
  2017-02-16 23:59 [PATCH] powerpc: Detect POWER9 architected mode Russell Currey
@ 2017-02-17  0:57 ` Michael Neuling
  2017-02-17  1:06   ` Russell Currey
  2017-02-17  2:44 ` Suraj Jitindar Singh
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Neuling @ 2017-02-17  0:57 UTC (permalink / raw)
  To: Russell Currey, linuxppc-dev

Can you make the comment/title a bit more descriptive...  Have a look at
c674e703cb1028e468527163074810b4a17bf379 where we added the p8.


> Signed-off-by: Russell Currey <ruscur@russell.cc>

Other than that, the code looks good..

Acked-By: Michael Neuling <mikey@neuling.org>



> ---
> =C2=A0arch/powerpc/kernel/cputable.c | 19 +++++++++++++++++++
> =C2=A01 file changed, 19 insertions(+)
>=20
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputabl=
e.c
> index 6a82ef039c50..d23a54b09436 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -386,6 +386,25 @@ static struct cpu_spec __initdata cpu_specs[] =3D {
> =C2=A0		.machine_check_early	=3D
> __machine_check_early_realmode_p8,
> =C2=A0		.platform		=3D "power8",
> =C2=A0	},
> +	{	/* 3.00-compliant processor, i.e. Power9 "architected" mode
> */
> +		.pvr_mask		=3D 0xffffffff,
> +		.pvr_value		=3D 0x0f000005,
> +		.cpu_name		=3D "POWER9 (architected)",
> +		.cpu_features		=3D CPU_FTRS_POWER9,
> +		.cpu_user_features	=3D COMMON_USER_POWER9,
> +		.cpu_user_features2	=3D COMMON_USER2_POWER9,
> +		.mmu_features		=3D MMU_FTRS_POWER9,
> +		.icache_bsize		=3D 128,
> +		.dcache_bsize		=3D 128,
> +		.num_pmcs		=3D 6,
> +		.pmc_type		=3D PPC_PMC_IBM,
> +		.oprofile_cpu_type	=3D "ppc64/ibm-compat-v1",
> +		.oprofile_type		=3D PPC_OPROFILE_INVALID,
> +		.cpu_setup		=3D __setup_cpu_power9,
> +		.cpu_restore		=3D __restore_cpu_power9,
> +		.flush_tlb		=3D __flush_tlb_power9,
> +		.platform		=3D "power9",
> +	},
> =C2=A0	{	/* Power7 */
> =C2=A0		.pvr_mask		=3D 0xffff0000,
> =C2=A0		.pvr_value		=3D 0x003f0000,

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

* Re: [PATCH] powerpc: Detect POWER9 architected mode
  2017-02-17  0:57 ` Michael Neuling
@ 2017-02-17  1:06   ` Russell Currey
  0 siblings, 0 replies; 4+ messages in thread
From: Russell Currey @ 2017-02-17  1:06 UTC (permalink / raw)
  To: Michael Neuling, linuxppc-dev

On Fri, 2017-02-17 at 11:57 +1100, Michael Neuling wrote:
> Can you make the comment/title a bit more descriptive...  Have a look at
> c674e703cb1028e468527163074810b4a17bf379 where we added the p8.
> 

I had a look at that when I was making the commit but I didn't think it really
added anything valuable (though I suppose mentioning cputable in the commit
message might add clarity).  I guess

    A PVR of 0x0F000005 means we are arch v3.00 compliant (i.e. POWER9)

to steal from yours...

> 
> > Signed-off-by: Russell Currey <ruscur@russell.cc>
> 
> Other than that, the code looks good..
> 
> Acked-By: Michael Neuling <mikey@neuling.org>
> 
> 
> 
> > ---
> >  arch/powerpc/kernel/cputable.c | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> > index 6a82ef039c50..d23a54b09436 100644
> > --- a/arch/powerpc/kernel/cputable.c
> > +++ b/arch/powerpc/kernel/cputable.c
> > @@ -386,6 +386,25 @@ static struct cpu_spec __initdata cpu_specs[] = {
> >  		.machine_check_early	=
> > __machine_check_early_realmode_p8,
> >  		.platform		= "power8",
> >  	},
> > +	{	/* 3.00-compliant processor, i.e. Power9 "architected"
> > mode
> > */
> > +		.pvr_mask		= 0xffffffff,
> > +		.pvr_value		= 0x0f000005,
> > +		.cpu_name		= "POWER9 (architected)",
> > +		.cpu_features		= CPU_FTRS_POWER9,
> > +		.cpu_user_features	= COMMON_USER_POWER9,
> > +		.cpu_user_features2	= COMMON_USER2_POWER9,
> > +		.mmu_features		= MMU_FTRS_POWER9,
> > +		.icache_bsize		= 128,
> > +		.dcache_bsize		= 128,
> > +		.num_pmcs		= 6,
> > +		.pmc_type		= PPC_PMC_IBM,
> > +		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
> > +		.oprofile_type		= PPC_OPROFILE_INVALID,
> > +		.cpu_setup		= __setup_cpu_power9,
> > +		.cpu_restore		= __restore_cpu_power9,
> > +		.flush_tlb		= __flush_tlb_power9,
> > +		.platform		= "power9",
> > +	},
> >  	{	/* Power7 */
> >  		.pvr_mask		= 0xffff0000,
> >  		.pvr_value		= 0x003f0000,

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

* Re: [PATCH] powerpc: Detect POWER9 architected mode
  2017-02-16 23:59 [PATCH] powerpc: Detect POWER9 architected mode Russell Currey
  2017-02-17  0:57 ` Michael Neuling
@ 2017-02-17  2:44 ` Suraj Jitindar Singh
  1 sibling, 0 replies; 4+ messages in thread
From: Suraj Jitindar Singh @ 2017-02-17  2:44 UTC (permalink / raw)
  To: Russell Currey, linuxppc-dev; +Cc: mikey

On Fri, 2017-02-17 at 10:59 +1100, Russell Currey wrote:
> Signed-off-by: Russell Currey <ruscur@russell.cc>
Tested-in-QEMU-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> ---
>  arch/powerpc/kernel/cputable.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/cputable.c
> b/arch/powerpc/kernel/cputable.c
> index 6a82ef039c50..d23a54b09436 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -386,6 +386,25 @@ static struct cpu_spec __initdata cpu_specs[] =
> {
>  		.machine_check_early	=
> __machine_check_early_realmode_p8,
>  		.platform		= "power8",
>  	},
> +	{	/* 3.00-compliant processor, i.e. Power9
> "architected" mode */
> +		.pvr_mask		= 0xffffffff,
> +		.pvr_value		= 0x0f000005,
> +		.cpu_name		= "POWER9 (architected)",
> +		.cpu_features		= CPU_FTRS_POWER9,
> +		.cpu_user_features	= COMMON_USER_POWER9,
> +		.cpu_user_features2	= COMMON_USER2_POWER9,
> +		.mmu_features		= MMU_FTRS_POWER9,
> +		.icache_bsize		= 128,
> +		.dcache_bsize		= 128,
> +		.num_pmcs		= 6,
> +		.pmc_type		= PPC_PMC_IBM,
> +		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
> +		.oprofile_type		=
> PPC_OPROFILE_INVALID,
> +		.cpu_setup		= __setup_cpu_power9,
> +		.cpu_restore		= __restore_cpu_power9,
> +		.flush_tlb		= __flush_tlb_power9,
> +		.platform		= "power9",
> +	},
>  	{	/* Power7 */
>  		.pvr_mask		= 0xffff0000,
>  		.pvr_value		= 0x003f0000,

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

end of thread, other threads:[~2017-02-17  2:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 23:59 [PATCH] powerpc: Detect POWER9 architected mode Russell Currey
2017-02-17  0:57 ` Michael Neuling
2017-02-17  1:06   ` Russell Currey
2017-02-17  2:44 ` Suraj Jitindar Singh

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.