Message ID | 20130504004756.GA3532@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | cbbc6f1b1433ef553d57826eee87a84ca49645ce |
Headers | show |
Hi Nish, Nishanth Aravamudan <nacc@linux.vnet.ibm.com> wrote on 05/03/2013 07:47:56 PM: > +/* 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 > +#define PPC_FEATURE2_TAR 0x04000000 > + > #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */ Following the existing naming convention in cputable.h, the features should probably be amended to the following: #define PPC_FEATURE2_ARCH_2_07 0x80000000 #define PPC_FEATURE2_HAS_HTM 0x40000000 #define PPC_FEATURE2_HAS_DSC 0x20000000 #define PPC_FEATURE2_HAS_EBB 0x10000000 #define PPC_FEATURE2_HAS_ISEL 0x08000000 #define PPC_FEATURE2_HAS_TAR 0x04000000 Notice that I changed DSCR to DSC. The 'R' wasn't descriptive. Ryan S. Arnold IBM Linux Technology Center
On Mon, 2013-05-06 at 14:07 -0500, Ryan Arnold wrote:
> Notice that I changed DSCR to DSC. The 'R' wasn't descriptive.
The "R" is the name of the register for which we are exposing the
availability to userspace... it's also the name of the sysfs entry so
I'd rather keep it for consistency.
Cheers,
Ben.
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote on 05/06/2013 04:41:01 PM: > Benjamin Herrenschmidt <benh@kernel.crashing.org> > 05/06/2013 04:41 PM > > To > > Ryan Arnold/Rochester/IBM@IBMUS > > cc > > Nishanth Aravamudan <nacc@linux.vnet.ibm.com>, linuxppc- > dev@lists.ozlabs.org, michael@ellerman.id.au, Michael R Meissner/ > Cambridge/IBM@IBMUS, Michael Neuling <mikey@neuling.org>, Peter > Bergner/Rochester/IBM@IBMUS, Steve Munroe/Rochester/IBM@IBMUS > > Subject > > Re: [PATCH v2 1/4] powerpc/cputable: reserve bits in HWCAP2 for new features > > On Mon, 2013-05-06 at 14:07 -0500, Ryan Arnold wrote: > > Notice that I changed DSCR to DSC. The 'R' wasn't descriptive. > > The "R" is the name of the register for which we are exposing the > availability to userspace... it's also the name of the sysfs entry so > I'd rather keep it for consistency. I'm fine with keeping the 'R' in the name. Thanks for the input. Ryan
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index fcc54ad..26807e5 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -224,8 +224,10 @@ extern const char *powerpc_base_platform; /* We only set the TM feature if the kernel was compiled with TM supprt */ #ifdef CONFIG_PPC_TRANSACTIONAL_MEM #define CPU_FTR_TM_COMP CPU_FTR_TM +#define PPC_FEATURE2_HTM_COMP PPC_FEATURE2_HTM #else #define CPU_FTR_TM_COMP 0 +#define PPC_FEATURE2_HTM_COMP 0 #endif /* We need to mark all pages as being coherent if we're SMP or we have a diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h index ed9dd81..5b76579 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,12 @@ #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 +#define PPC_FEATURE2_TAR 0x04000000 + #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
Also, make HTM's presence dependent on the .config option. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> --- Changes since v1: - Add TAR. - Make HTM config dependent.