linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Cc: Michael R Meissner <mrmeissn@us.ibm.com>,
	Steve Munroe <sjmunroe@us.ibm.com>,
	Peter Bergner <bergner@us.ibm.com>,
	Ryan Arnold <ryanarn@us.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2
Date: Sat, 04 May 2013 10:04:54 +1000	[thread overview]
Message-ID: <2889.1367625894@ale.ozlabs.ibm.com> (raw)
In-Reply-To: <20130503231933.GA29436@linux.vnet.ibm.com>

Nishanth Aravamudan <nacc@linux.vnet.ibm.com> wrote:

> Now that we have AT_HWCAP2 support, start exposing some of the new
> POWER8 features via it.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

A few points:

We need a TAR bit as well, although this could be covered in 207?

For TM we need to turn it off if CONFIG_PPC_TRANSACTIONAL_MEM is not
set.  Look at PPC_FEATURE_HAS_ALTIVEC_COMP for how we do that and follow
the bouncing ball.  

Please add ISEL on other processors.

Please add DSCR on other processors.

EBB can be reserved, but there is no enablement at this point so don't
turn it on yet.  We'll turn it on when we send the perf API.

Mikey

> ---
> Note: there are, I think, some Freescale processors that also should be
> updated to indicate they support ISEL, but I don't know which ones.
> Since this is a new feature bit (and vector), it seems like we can fix
> that up in a follow-on patch. Also, this is my first patch trying to
> manipulate these bits, so please let me know if I'm doing something
> wrong (for instance, I don't see any particular order to the bits in
> PPC_FEATURE_*)
> 
> diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h
> index ed9dd81..78db4e2 100644
> --- a/arch/powerpc/include/uapi/asm/cputable.h
> +++ b/arch/powerpc/include/uapi/asm/cputable.h
> @@ -1,6 +1,7 @@
>  #ifndef _UAPI__ASM_POWERPC_CPUTABLE_H
>  #define _UAPI__ASM_POWERPC_CPUTABLE_H
>  
> +/* in AT_HWCAP */
>  #define PPC_FEATURE_32			0x80000000
>  #define PPC_FEATURE_64			0x40000000
>  #define PPC_FEATURE_601_INSTR		0x20000000
> @@ -33,4 +34,11 @@
>  #define PPC_FEATURE_TRUE_LE		0x00000002
>  #define PPC_FEATURE_PPC_LE		0x00000001
>  
> +/* in AT_HWCAP2 */
> +#define PPC_FEATURE2_ARCH_2_07		0x80000000
> +#define PPC_FEATURE2_HTM		0x40000000
> +#define PPC_FEATURE2_DSCR		0x20000000
> +#define PPC_FEATURE2_EBB		0x10000000
> +#define PPC_FEATURE2_ISEL		0x08000000
> +
>  #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index ae9f433..871c741 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -102,6 +102,9 @@ extern void __restore_cpu_e6500(void);
>  				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
>  				 PPC_FEATURE_TRUE_LE | \
>  				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
> +#define COMMON_USER2_POWER8	(PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | \
> +				 PPC_FEATURE2_DSCR | PPC_FEATURE2_EBB | \
> +				 PPC_FEATURE2_ISEL)
>  #define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
>  				 PPC_FEATURE_TRUE_LE | \
>  				 PPC_FEATURE_HAS_ALTIVEC_COMP)
> @@ -443,6 +446,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
>  		.cpu_name		= "POWER8 (architected)",
>  		.cpu_features		= CPU_FTRS_POWER8,
>  		.cpu_user_features	= COMMON_USER_POWER8,
> +		.cpu_user_features2	= COMMON_USER2_POWER8,
>  		.mmu_features		= MMU_FTRS_POWER8,
>  		.icache_bsize		= 128,
>  		.dcache_bsize		= 128,
> @@ -492,6 +496,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
>  		.cpu_name		= "POWER8 (raw)",
>  		.cpu_features		= CPU_FTRS_POWER8,
>  		.cpu_user_features	= COMMON_USER_POWER8,
> +		.cpu_user_features2	= COMMON_USER2_POWER8,
>  		.mmu_features		= MMU_FTRS_POWER8,
>  		.icache_bsize		= 128,
>  		.dcache_bsize		= 128,
> 

  parent reply	other threads:[~2013-05-04  0:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 23:19 [PATCH] arch/powerpc: advertise ISA2.07, HTM, DSCR, EBB and ISEL bits in HWCAP2 Nishanth Aravamudan
2013-05-03 23:23 ` Benjamin Herrenschmidt
2013-05-03 23:40   ` Nishanth Aravamudan
2013-05-06 14:38     ` Ryan Arnold
2013-05-06 21:37       ` Benjamin Herrenschmidt
2013-05-07 15:11         ` Ryan Arnold
2013-05-07 20:33         ` Nishanth Aravamudan
2013-05-07 20:49           ` Benjamin Herrenschmidt
2013-05-07 21:11             ` Nishanth Aravamudan
2013-05-03 23:26 ` Michael R Meissner
2013-05-04 21:42   ` Segher Boessenkool
2013-05-04  0:04 ` Michael Neuling [this message]
2013-05-04  0:47   ` [PATCH v2 1/4] powerpc/cputable: reserve bits in HWCAP2 for new features Nishanth Aravamudan
2013-05-04  0:48     ` [PATCH v2 2/4] powerpc/cputable: advertise DSCR support on P7/P7+ Nishanth Aravamudan
2013-05-04  0:49       ` [PATCH v2 3/4] powerpc/cputable: advertise ISEL support on appropriate embedded processors Nishanth Aravamudan
2013-05-04  0:49         ` [PATCH v2 4/4] powerpc/cputable: advertise support for ISEL/HTM/DSCR/TAR on POWER8 Nishanth Aravamudan
2013-05-05  2:01         ` [PATCH v3 3/4] powerpc/cputable: advertise ISEL support on appropriate embedded processors Nishanth Aravamudan
2013-05-20 15:04       ` [PATCH v2 2/4] powerpc/cputable: advertise DSCR support on P7/P7+ Will Schmidt
2013-05-20 23:41         ` Michael Neuling
2013-05-06 19:07     ` [PATCH v2 1/4] powerpc/cputable: reserve bits in HWCAP2 for new features Ryan Arnold
2013-05-06 21:41       ` Benjamin Herrenschmidt
2013-05-07 15:07         ` Ryan Arnold

Reply instructions:

You may reply publicly 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=2889.1367625894@ale.ozlabs.ibm.com \
    --to=mikey@neuling.org \
    --cc=bergner@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mrmeissn@us.ibm.com \
    --cc=nacc@linux.vnet.ibm.com \
    --cc=ryanarn@us.ibm.com \
    --cc=sjmunroe@us.ibm.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).