[PATCH] powerpc: Expose SMT and L1 icache snoop userland features

This patch makes userland aware of the icache snoop capability of the
POWER5 (and possibly others in the future) and of SMT capabilities.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by Benjamin Herrenschmidt and committed by Paul Mackerras aa5cb021 e2a002b9

+8 -3
+6 -3
arch/powerpc/kernel/cputable.c
··· 53 PPC_FEATURE_HAS_MMU) 54 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) 55 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) 56 - #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5) 57 - #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS) 58 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 59 PPC_FEATURE_BOOKE) 60 ··· 269 .cpu_name = "Cell Broadband Engine", 270 .cpu_features = CPU_FTRS_CELL, 271 .cpu_user_features = COMMON_USER_PPC64 | 272 - PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP, 273 .icache_bsize = 128, 274 .dcache_bsize = 128, 275 .cpu_setup = __setup_cpu_be,
··· 53 PPC_FEATURE_HAS_MMU) 54 #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64) 55 #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4) 56 + #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\ 57 + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 58 + #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ 59 + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 60 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 61 PPC_FEATURE_BOOKE) 62 ··· 267 .cpu_name = "Cell Broadband Engine", 268 .cpu_features = CPU_FTRS_CELL, 269 .cpu_user_features = COMMON_USER_PPC64 | 270 + PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP | 271 + PPC_FEATURE_SMT, 272 .icache_bsize = 128, 273 .dcache_bsize = 128, 274 .cpu_setup = __setup_cpu_be,
+2
include/asm-powerpc/cputable.h
··· 20 #define PPC_FEATURE_POWER5_PLUS 0x00020000 21 #define PPC_FEATURE_CELL 0x00010000 22 #define PPC_FEATURE_BOOKE 0x00008000 23 24 #ifdef __KERNEL__ 25 #ifndef __ASSEMBLY__
··· 20 #define PPC_FEATURE_POWER5_PLUS 0x00020000 21 #define PPC_FEATURE_CELL 0x00010000 22 #define PPC_FEATURE_BOOKE 0x00008000 23 + #define PPC_FEATURE_SMT 0x00004000 24 + #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 25 26 #ifdef __KERNEL__ 27 #ifndef __ASSEMBLY__