Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/cputable: Reserve bits in HWCAP2 for new features

Also, make HTM's presence dependent on the .config option.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Nishanth Aravamudan and committed by
Benjamin Herrenschmidt
cbbc6f1b d82fb31a

+11
+2
arch/powerpc/include/asm/cputable.h
··· 224 224 /* We only set the TM feature if the kernel was compiled with TM supprt */ 225 225 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 226 226 #define CPU_FTR_TM_COMP CPU_FTR_TM 227 + #define PPC_FEATURE2_HTM_COMP PPC_FEATURE2_HTM 227 228 #else 228 229 #define CPU_FTR_TM_COMP 0 230 + #define PPC_FEATURE2_HTM_COMP 0 229 231 #endif 230 232 231 233 /* We need to mark all pages as being coherent if we're SMP or we have a
+9
arch/powerpc/include/uapi/asm/cputable.h
··· 1 1 #ifndef _UAPI__ASM_POWERPC_CPUTABLE_H 2 2 #define _UAPI__ASM_POWERPC_CPUTABLE_H 3 3 4 + /* in AT_HWCAP */ 4 5 #define PPC_FEATURE_32 0x80000000 5 6 #define PPC_FEATURE_64 0x40000000 6 7 #define PPC_FEATURE_601_INSTR 0x20000000 ··· 33 32 34 33 #define PPC_FEATURE_TRUE_LE 0x00000002 35 34 #define PPC_FEATURE_PPC_LE 0x00000001 35 + 36 + /* in AT_HWCAP2 */ 37 + #define PPC_FEATURE2_ARCH_2_07 0x80000000 38 + #define PPC_FEATURE2_HTM 0x40000000 39 + #define PPC_FEATURE2_DSCR 0x20000000 40 + #define PPC_FEATURE2_EBB 0x10000000 41 + #define PPC_FEATURE2_ISEL 0x08000000 42 + #define PPC_FEATURE2_TAR 0x04000000 36 43 37 44 #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */