[PATCH] powerpc: Add cputable entry for POWER6

Add a cputable entry for the POWER6 processor.

The SIHV and SIPR bits in the mmcra have moved in POWER6, so disable
support for that until oprofile is fixed.

Also tell firmware that we know about POWER6.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Anton Blanchard and committed by
Paul Mackerras
03054d51 09b03b6c

+27 -4
+16
arch/powerpc/kernel/cputable.c
··· 57 57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 58 58 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ 59 59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 60 + #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ 61 + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 60 62 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 61 63 PPC_FEATURE_BOOKE) 62 64 ··· 264 262 .oprofile_cpu_type = "ppc64/power5+", 265 263 .oprofile_type = PPC_OPROFILE_POWER4, 266 264 .platform = "power5+", 265 + }, 266 + { /* Power6 */ 267 + .pvr_mask = 0xffff0000, 268 + .pvr_value = 0x003e0000, 269 + .cpu_name = "POWER6", 270 + .cpu_features = CPU_FTRS_POWER6, 271 + .cpu_user_features = COMMON_USER_POWER6, 272 + .icache_bsize = 128, 273 + .dcache_bsize = 128, 274 + .num_pmcs = 6, 275 + .cpu_setup = __setup_cpu_power4, 276 + .oprofile_cpu_type = "ppc64/power6", 277 + .oprofile_type = PPC_OPROFILE_POWER4, 278 + .platform = "power6", 267 279 }, 268 280 { /* Cell Broadband Engine */ 269 281 .pvr_mask = 0xffff0000,
+1
arch/powerpc/kernel/prom_init.c
··· 686 686 */ 687 687 static unsigned char ibm_architecture_vec[] = { 688 688 W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ 689 + W(0xffff0000), W(0x003e0000), /* POWER6 */ 689 690 W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ 690 691 5 - 1, /* 5 option vectors */ 691 692
+10 -4
include/asm-powerpc/cputable.h
··· 22 22 #define PPC_FEATURE_BOOKE 0x00008000 23 23 #define PPC_FEATURE_SMT 0x00004000 24 24 #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 25 + #define PPC_FEATURE_ARCH_2_05 0x00001000 25 26 26 27 #ifdef __KERNEL__ 27 28 #ifndef __ASSEMBLY__ ··· 321 320 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 322 321 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 323 322 CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) 323 + #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 324 + CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 325 + CPU_FTR_MMCRA | CPU_FTR_SMT | \ 326 + CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 327 + CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE) 324 328 #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 325 329 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 326 330 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ ··· 337 331 #ifdef __powerpc64__ 338 332 #define CPU_FTRS_POSSIBLE \ 339 333 (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ 340 - CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | \ 341 - CPU_FTR_CI_LARGE_PAGE) 334 + CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ 335 + CPU_FTRS_CELL | CPU_FTR_CI_LARGE_PAGE) 342 336 #else 343 337 enum { 344 338 CPU_FTRS_POSSIBLE = ··· 382 376 #ifdef __powerpc64__ 383 377 #define CPU_FTRS_ALWAYS \ 384 378 (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ 385 - CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL & \ 386 - CPU_FTRS_POSSIBLE) 379 + CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ 380 + CPU_FTRS_CELL & CPU_FTRS_POSSIBLE) 387 381 #else 388 382 enum { 389 383 CPU_FTRS_ALWAYS =